Re: [Lazarus] TListView column sizes are ignored
On 08/05/2015 07:11 AM, Graeme Geldenhuys wrote: No worries, I figured out what to do. what is/was the secret? -- NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] learning advice for FPC/Lazarus noob
On 08/03/2015 06:38 PM, Graeme Geldenhuys wrote: I don't know of any editor with auto-complete or similar functionality built-in for IPF but then it isn't really needed, because the IPF syntax is very simple and easy to learn. Much easier and less than say HTML or CSS. this could be added to Lazarus, though... right? -- NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Tracking software useage
On 07/23/2015 12:42 AM, Richard Mace wrote: Hi all, I am really interested in tracking how many people are using my software and was wondering what people that would be a good and ethical way of doing it. Any thoughts? quite many call home packages are quickly removed over here unless they are extremely important and required... in those cases, they are blocked from making the call... this mainly because of privacy concerns... it is no one's business when someone executes a program or how long they are running it or other metrics that may be divined from certain call home connections... in some areas of the world, the use of timestamps in messaging is illegal because of the possibility of tracking when someone may be at home or work... if you really desire this information, make it configurable so that those who don't care can enable it if they like... it should be disabled by default, though... -- NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] checksums for downloads
On 07/19/2015 09:29 AM, Marc Santhoff wrote: On So, 2015-07-19 at 14:18 +0100, Martin Frb wrote: I am not aware of them being separately published (except for the ones on sourceforge, which are calculated by sourceforge). I think it may be only little effort to publish those sums on the website or put a file mdsums.txt aside wioth the downloads. ideally there would be one md5sum file for each individual file available for download... this way, one can check the remote checksum file with a local one to see if the file has been updated since the checksums would be different... we use this for automated update mechanisms... -- NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Dbase tutorial
On 07/04/2015 09:20 AM, Larry Dalton wrote: Where can I get a tutorial for using dbase on lazarus? dbase as in the old dBase database stuff or dbase as in coding for and using (SQL) databases? IIRC and unless something has changed that i'm not aware of (quite easy), the dbase interface code is only really for reading that data... today's databases are all SQL databases which offers a lot more capabilities and is really where you should look... if you have an existing dbase database, you might consider to convert it from that format to SQL and store the information in a modern database... -- NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Dbase tutorial
On 07/04/2015 12:19 PM, Larry Dalton wrote: Is there a way to use microsoft excel spreadsheets? yes... it is different than database stuffs, though... i haven't done it but i have read about it over the years i've been on this list... fpspreadsheet is what you want for that... if you are doing anything with csv files, then you probably want to start here... https://www.google.com/search?q=freepascal+lazarus+csv+files also, please don't top post... it really messes up trying to follow a conversation... it is a huge mess when it gets mixed in with inline posting and bottom posting making a truly distasteful hash of things ;) On Jul 4, 2015, at 11:04, waldo kitty wkitt...@windstream.net wrote: On 07/04/2015 09:20 AM, Larry Dalton wrote: Where can I get a tutorial for using dbase on lazarus? dbase as in the old dBase database stuff or dbase as in coding for and using (SQL) databases? IIRC and unless something has changed that i'm not aware of (quite easy), the dbase interface code is only really for reading that data... today's databases are all SQL databases which offers a lot more capabilities and is really where you should look... if you have an existing dbase database, you might consider to convert it from that format to SQL and store the information in a modern database... -- NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Solarized 2 color schemes for Lazarus
On 06/30/2015 06:16 AM, Graeme Geldenhuys wrote: On 2015-06-30 10:21, Graeme Geldenhuys wrote: Screenshots attached of my Dark and Light theme. Note, I only applied the theme for the Object Pascal file format, not for XML, TXT etc. In case anybody was interested, here is my Dark and Light versions of the Solarized theme. stupid question time: i've looked about trying to figure out how to use themes in the IDE but many resources are talking about theming a project in the project options... that's not what we're after... i did finally find something about a userschemes directory that should be in the pcp directory so i created it and placed the two xml files in there in their own directory like they are in the archive... ~/development/config_lazarus ~/development/config_lazarus/userschemes ~/development/config_lazarus/userschemes/solarized_graemeg ~/development/config_lazarus/userschemes/solarized_graemeg/solarized_dark.xml ~/development/config_lazarus/userschemes/solarized_graemeg/solarized_light.xml the problem now is where in the IDE settings do i find the option to select one of these xml color theme files?? i've looked in tools-options-editor-display-colors and not seen anything obvious... i'm using v1.5 of lazarus from trunk... Lazarus 1.5 r49324M FPC 3.1.1 x86_64-linux-gtk 2 -- NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Solarized 2 color schemes for Lazarus
On 06/30/2015 04:00 PM, Michael Van Canneyt wrote: On Tue, 30 Jun 2015, waldo kitty wrote: [...] the problem now is where in the IDE settings do i find the option to select one of these xml color theme files?? i've looked in tools-options-editor-display-colors and not seen anything obvious... i'm using v1.5 of lazarus from trunk... Top of that dialog, dropdown next to language dropdown. i did actually look in there... See attached screenshot. that helps greatly... something else is that the new theme files have to be in place before loading the IDE... closing the configurator and reopening it doesn't cause it to rescan for new directories or options like this... in the end, i do now have a few new themes... thanks! -- NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Solarized 2 color schemes for Lazarus
On 06/30/2015 02:55 PM, aradeonas wrote: When you use Trunk version you should put it in patch like this: ~/development/config_lazarus/userschemes And for a stable version in : C:\Users\{User}\AppData\Local\lazarus\userschemes Dont put them in sub folder or something else. ok... no subfolder... that helps :) -- NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Solarized 2 color schemes for Lazarus
On 06/30/2015 02:47 PM, Graeme Geldenhuys wrote: On 2015-06-30 19:31, waldo kitty wrote: On 06/30/2015 06:16 AM, Graeme Geldenhuys wrote: On 2015-06-30 10:21, Graeme Geldenhuys wrote: Screenshots attached of my Dark and Light theme. Note, I only applied the theme for the Object Pascal file format, not for XML, TXT etc. In case anybody was interested, here is my Dark and Light versions of the Solarized theme. stupid question time: i've looked about trying to figure out how to use themes in the IDE but many resources are talking about theming a project in the project options... that's not what we're after... i did finally find something about a userschemes directory that should be in the I believe you can place them somewhere under the laz install directory, but I place them in the ~/.lazarus/ tree as follows: /home/graemeg/.lazarus/ |-projectsessions/ |-userschemes/ solarized_dark.xml solarized_light.xml my installation is built from fpcup... it uses a special directory for its fpc and lazarus installation... i was able to figure out the pcp though... the real clue is that these xml files cannot be inside a subdirectory in userschemes... the problem now is where in the IDE settings do i find the option to select one of these xml color theme files? Tools - Options - Editor - Display - Color Then take a look at the top middle of that dialog. There should be a Object Pascal file type dropdown. Next to that on the right is the color scheme selection, for the currently selected file type. Yours might say Default. Click that dropdown and select Solarized_Dark or Solarized_Light. Hope that helps. I've attached a screenshot in case my instructions were not clear. yes, it does help... thanks to the three of you who responded to my plea :) -- NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Solarized 2 color schemes for Lazarus
On 06/30/2015 04:58 PM, Graeme Geldenhuys wrote: On 2015-06-30 21:11, waldo kitty wrote: the new theme files have to be in place before loading the IDE... closing the configurator and reopening it doesn't cause it to rescan for new directories or options like this... Very true, and I noticed that too. If you have the time, please add it to Mantis as feature request. done! http://bugs.freepascal.org/view.php?id=28367 -- NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] I have some custom components, can I convert Delphi - Lazarus?
On 06/16/2015 06:43 PM, Bo Berglund wrote: Can Lazarus do Android platform apps? errrmmm... it could the last time i looked... i don't do android or any small devices like that but there's been a lot of discussion and work on that capability over the last several years ;) -- NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Docked Form
On 06/12/2015 02:49 AM, Balazs Szekely wrote: Hi Sandro, Thank you for forwarding my mail. Yes, I'm registered to the mailing list and I do not understand why my mails end up in spam. Usually I'm able to reply to other peoples mails, but sending new one always fail. your first post with the attachment came here just fine... no spam notice and it wasn't hidden in any of my spam folders on any of my accounts i have subscribed... -- NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Strange: still Mails to my gmail Adress
On 06/01/2015 01:36 PM, John Landmesser wrote: On 29.05.2015 12:15, waldo kitty wrote: additionally, if you are pulling all these mails to a local mailstore with something like thunderbird, are you sure you don't have them being stored in a folder under a different server config? what i mean by that is i keep all my accounts with their own sets of folders... at one time i did have rules to move messages into other folders under other accounts... that wasn't such a good idea so now i keep everything separate... perhaps you have such a rule to copy or move mail into another folder? ... i had gmail.filters in thunderbird to move mails from my google inbox to a folder called gmail.lazarus I deleted this filter for gmail and created a new one for gmx.de that is receiving now the mails from lazarus.list. I think the reason for this troubles is thunderbird?!! kinda sounds like a filtering thing, yes... it was doing what you told it to do, though ;) Thanks for your advises! you are welcome :) -- NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Image caching problems in wiki
On 05/30/2015 09:39 AM, Werner Pamler wrote: I already posted in the forum, but don't get response there; therefore, I give it another try here: Something is wrong with images in the wiki. I just replaced the DefaultPalette.png of http://wiki.lazarus.freepascal.org/FPSpreadsheet by a new screenshot. But the wiki page still displays the old version. Double-clicking the image brings up page http://wiki.lazarus.freepascal.org/File:DefaultPalette.png which shows the correct version - hence I am sure that the new version is definitely uploaded. Moreover, this page contains a hyperlink full resolution - this shows the wrong image again. Strange... Is there some caching issue? FWIW: i just looked and they seem to be fine... how could i tell if i was seeing the old one? in this one i see that we're on row 9 (orangish tint on the row number) and all three show this... the colors and words look the same... if there is a caching issue, it may be on a system between you and the wiki (ISP using transparent proxy?) or it may be in your browser cache... -- NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Strange: still Mails to my gmail Adress
On 05/29/2015 05:19 AM, Marc Weustink wrote: John Landmesser wrote: thats the source of a Mail ( without gmail in it !!), but it was sent to my gmail address!! If this message was received on your gmail, it wasn't sent there by the mailinglist: Received: from mailer.lazarus.freepascal.org ([80.123.225.56]) by mx-ha.gmx.net (mxgmx105) with ESMTPS (Nemesis) id 0MXndT-1YhKSG3CtD-00Wn7X for jmlandmes...@gmx.de; Thu, 21 May 2015 16:45:59 +0200 Here you see that the message from mailer.lazarus... is recieved by gmx. Are you sure you don't have a mailforward configured from gmx to gmail? Are you sure you don't have a mailpop configured in gmail? additionally, if you are pulling all these mails to a local mailstore with something like thunderbird, are you sure you don't have them being stored in a folder under a different server config? what i mean by that is i keep all my accounts with their own sets of folders... at one time i did have rules to move messages into other folders under other accounts... that wasn't such a good idea so now i keep everything separate... perhaps you have such a rule to copy or move mail into another folder? -- NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Date value 0
On 05/27/2015 05:05 AM, Mark Morgan Lloyd wrote: Gordon Cooper wrote: We were taught that 24.00 did not exist. Time went from 23.59 to 00.00. The same rule can be applied to 11.59 am pm. Except where there's a leap second. speaking of which, guess what is coming up... [quote] Date: Mon, 05 Jan 2015 14:25:49 +0100 From: IERS EOP Product Center services.i...@obspm.fr Reply-To: IERS EOP Product Center services.i...@obspm.fr To: bulc.i...@obspm.fr INTERNATIONAL EARTH ROTATION AND REFERENCE SYSTEMS SERVICE (IERS) SERVICE INTERNATIONAL DE LA ROTATION TERRESTRE ET DES SYSTEMES DE REFERENCE SERVICE DE LA ROTATION TERRESTRE DE L'IERS OBSERVATOIRE DE PARIS 61, Av. de l'Observatoire 75014 PARIS (France) Tel. : 33 (0) 1 40 51 22 26 FAX : 33 (0) 1 40 51 22 91 e-mail: services.i...@obspm.fr http://hpiers.obspm.fr/eop-pc Paris, 5 January 2015 Bulletin C 49 To authorities responsible for the measurement and distribution of time UTC TIME STEP on the 1st of July 2015 A positive leap second will be introduced at the end of June 2015. The sequence of dates of the UTC second markers will be: 2015 June 30, 23h 59m 59s 2015 June 30, 23h 59m 60s 2015 July 1, 0h 0m 0s The difference between UTC and the International Atomic Time TAI is: from 2012 July 1,0h UTC, to 2015 July 1 0h UTC : UTC-TAI = - 35s from 2015 July 1,0h UTC, until further notice: UTC-TAI = - 36s Leap seconds can be introduced in UTC at the end of the months of December or June, depending on the evolution of UT1-TAI. Bulletin C is mailed every six months, either to announce a time step in UTC or to confirm that there will be no time step at the next possible date. Daniel Gambis Head Earth Orientation Center of IERS Observatoire de Paris, France [/quote] ;) O:) -- NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Date value 0
On 05/28/2015 05:18 AM, Michael Schnell wrote: On 05/27/2015 08:48 PM, waldo kitty wrote: yes... 12:00am is midnight... 00:00am is the same... so also is 00:00 or 24:00 in 24hour time... AFAIK it's rather set that 24:00 is 00:00 the next day, but 12:00 am is not 100% confident as Mark says. i don't know why it isn't confident... am is morning so 12am is the very first entry into morning as 12pm is the very first entry into afternoon... i don't understand the confusion or the problem... -- NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Date value 0
On 05/28/2015 11:57 AM, Jürgen Hestermann wrote: Am 2015-05-28 um 17:14 schrieb waldo kitty: i don't know why it isn't confident... am is morning so 12am is the very first entry into morning as 12pm is the very first entry into afternoon... i don't understand the confusion or the problem... So the day starts with 12 at midnight and then switches to 1 an hour later? yes... 12am and 00:00am and 00:00 (24 hour mode) are all the same... If that isn't confusing... it isn't... it never has been, really... i've been using that form for over 50 years with no problems... granted, it doesn't work well with mod12 too well but then noon would be 00:00pm so there has to be some adjustment in code for the human aspect of rendering... it isn't that complicated... i was telling the time correctly by the time i was 3 or 4 and i know that my oldest granddaughter was doing so by 3 because i had a hand in her early education... it wasn't until i was older that i learned military 24 hour nomenclature... then later after that was the 100 minute hour they also use(d?)... -- NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Date value 0
On 05/27/2015 03:19 AM, Michael Van Canneyt wrote: Does 12:00 am actually exist ? If so, what is that ? Midnight or midday ? Should not that be 00:00 am ? (or is that the same ?) yes... 12:00am is midnight... 00:00am is the same... so also is 00:00 or 24:00 in 24hour time... -- NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Code Browser
On 12/4/2014 12:42 AM, Hans-Peter Diettrich wrote: Lazarus 1.3 shows the codebrowser when I hit F1 on an unknown (incomplete...) identifier. That's a nice feature, but searching in the browser can become tedious. something that threw me off was when it was scanning code files... i don't know how long it took me to finally see the bar at the bottom of the screen and the numbers being updated as it advanced... When a unit is missing from a uses list, searching in the project files seems not to be the right choice, instead it seems to be required to search the FCL as well(?) - what takes a considerable time. Unfortunately the browser restarts the search as soon as I try to change the search string, before I finish typing :-( Suggestions: 1. Wait until the user presses Rescan, optionally add an according (Auto Rescan) checkbox. 2. Add an Stop/Cancel button, that allows to stop the search (not closing the browser window!). 3. Add F1 and/or Help button for help on using the Code Browser. having recently run into this new weird box when hitting F1 and expecting the standard lhelp, i think i can agree with the above ;) -- NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus and Application.ProcessMessages
On 12/4/2014 10:24 AM, Lukasz Sokol wrote: (OnTimer execution has the same problem : inevitably splits the procedure into more procedures, that can no longer use same local variables and stuff) you can't make them subroutines of the subroutine? eg: program foobie; procedure dofoobie; var thisfoo : integer = 0; thatfoo : integer = 0; procedure littlefoobie; begin inc(thisfoo,thatfoo); inc(thatfoo); end; begin repeat begin littlefoobie; writeln(thisfoo,'',thatfoo); end; until thisfoo = 25; end; begin dofoobie; end. -- NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] FPC 2.7.1 and console output
On 12/3/2014 10:06 AM, Hans-Peter Diettrich wrote: Mattias Gaertner schrieb: On Tue, 02 Dec 2014 22:41:04 +0100 Hans-Peter Diettrich drdiettri...@aol.com wrote: Next I tried FP, but couldn't figure out how to configure it at all, for using the trunk compiler :-( Do you mean in Lazarus? No, the FP IDE. It has become almost useless, most options are read-only :-( i haven't found this... last night (really very early this morning) i had to add some paths to my FP so that i could get it to compile a FileMask demo program that uses the lazarus Masks unit... since i already had it working as a lazarus project, i went into the project's options and used the show options button at the bottom of the screen... i copied the values shown and pasted them into my FP.CFG file... some slight editing to fix them up as the rest and remove duplicates or conflicting ones and then i started FP again... when i went looking at the options and directories and such, everything was in place as expected and my project was able to be compiled with FP just as from lazarus... something that comes to mind, though, is where you state that you wanted to configure FP for FPC trunk... mine is running FPC trunk and i don't see any way of changing that /within/ FP... the only way i can think of is maybe by the PATH that is set before starting FP or maybe there's a $fpversion that can be used but i've not found a way for that to contain and work with trunk... only numerics like 2.6.4 or 2.7.1 seem to show up in that variable... -- NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] FPC 2.7.1 and console output
On 12/3/2014 11:26 AM, Sven Barth wrote: Am 03.12.2014 16:51 schrieb Hans-Peter Diettrich drdiettri...@aol.com No, the FP IDE. It has become almost useless, most options are read-only :-( You need to build the FP included with trunk, because the compiler is statically linked into FP. This is usually done when you do a make all or at least when you do a make install. ahhh... it would be nice to be able to specify which fpc to use in the same way that one can do with lazarus and other tools ;) -- NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] FPC 2.7.1 and console output
On 12/3/2014 11:50 AM, Mattias Gaertner wrote: On Wed, 03 Dec 2014 16:46:43 +0100 Hans-Peter Diettrich drdiettri...@aol.com wrote: [...] Q: how do I debug the RTL (step into)? Compile it with debugging info (-gl) and install it. would that be something like OPT=-gl -gh -dHEAPTRC_WINDOW maybe like the following? make all install INSTALL_PREFIX=%myFPCpath% PP=%myFPCbinutils%\%ppcbinary% DATA2INC=%myFPCpath%\utils\data2inc.exe OPT=-gl -gh -dHEAPTRC_WINDOW -- NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] FPC 2.7.1 and console output
On 12/3/2014 1:58 PM, Sven Barth wrote: Am 03.12.2014 18:33 schrieb waldo kitty wkitt...@windstream.net: On 12/3/2014 11:26 AM, Sven Barth wrote: Am 03.12.2014 16:51 schrieb Hans-Peter Diettrich drdiettri...@aol.com No, the FP IDE. It has become almost useless, most options are read-only :-( You need to build the FP included with trunk, because the compiler is statically linked into FP. This is usually done when you do a make all or at least when you do a make install. ahhh... it would be nice to be able to specify which fpc to use in the same way that one can do with lazarus and other tools ;) Considering that FP has a much smaller user base than Lazarus (not to speak of features even), it's just not worth it. ;) i guess my current method whereby i change the path to point to the desired FPC version is the only real way... i have a little script that i use, runfp, which sets up my environment... it requires the version of FPC i want to use to be specified on the command line... eg: runfp 2.6.2 runfp 2.6.4 runfp trunk but using trunk messes up things that use $FPVERSION as that requires that i have that version of FPC in a dedicated directory other than trunk... but hey, it works for now and i only have to make sure that my FP.CFG and similar files are correct for the version i'm currently playing with... -- NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] lresources.pp(3089, 67) Error: Identifier not found RT_RCDATA
On 11/22/2014 6:45 PM, Mattias Gaertner wrote: On Sat, 22 Nov 2014 23:27:30 +0100 Bart bartjun...@gmail.com wrote: On 11/22/14, Joost van der Sluis jo...@cnoc.nl wrote: Add the windows-unit to the uses section of lresources as a quick fix. Done. i pulled your update last evening and compiled... it seems to have worked... -- NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] lresources.pp(3089, 67) Error: Identifier not found RT_RCDATA
fpc trunk r29110 lazarus trunk r46966 vista 32-bit i just updated fpc trunk and lazarus trunk... fpc compiled ok... lazarus fails with lresources.pp(3089,67) Error: Identifier not found RT_RCDATA *** * TASK: build lazbuild, startlazarus and necessary tools... * CMND: make OPT=-gl -gh -dHEAPTRC_WINDOW lazbuild lcl basecomponents starter bigidecomponents lhelp * [...] c:/freepascal/binutils/i386-win32/cp.exe -f Makefile.compiled units/i386-win32/CodeTools.compiled make[1]: Leaving directory `c:/freepascal/laz/components/codetools' make -C lcl LCL_PLATFORM=nogui make[1]: Entering directory `c:/freepascal/laz/lcl' c:/freepascal/binutils/i386-win32/rm.exe -f units/i386-win32/alllclunits.ppu c:/freepascal/binutils/i386-win32/gmkdir.exe -p units/i386-win32 c:/freepascal/fpc/trunk/bin/i386-win32/ppc386.exe -gl -Fu../packager/units/i386-win32 -Fu../components/lazutils/lib/i386-win32 -Fu. -Fuforms -Fuwidgetset -Fiinclude -FE. -FUunits/i386-win32 -gl -gh -dHEAPTRC_WINDOW -di386 alllclunits.pp Free Pascal Compiler version 2.7.1 [2014/11/22] for i386 Copyright (c) 1993-2014 by Florian Klaempfl and others Target OS: Win32 for i386 Compiling alllclunits.pp Compiling checklst.pas Compiling lclproc.pas Compiling lclstrconsts.pas Writing Resource String Table file: lclstrconsts.rsj Compiling lcltype.pp Compiling .\widgetset\wsreferences.pp Compiling graphtype.pp Compiling graphics.pp Compiling lclversion.pas Compiling intfgraphics.pas Compiling icnstypes.pas Compiling graphics.pp Compiling lmessages.pp Compiling lresources.pp Compiling dynqueue.pas lresources.pp(3089,67) Error: Identifier not found RT_RCDATA lresources.pp(5781) Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted make[1]: *** [alllclunits.ppu] Error 1 make[1]: Leaving directory `c:/freepascal/laz/lcl' make: *** [lazbuild] Error 2 -- NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] lresources.pp(3089, 67) Error: Identifier not found RT_RCDATA
On 11/22/2014 4:27 PM, Joost van der Sluis wrote: On 11/22/2014 08:30 PM, waldo kitty wrote: fpc trunk r29110 lazarus trunk r46966 vista 32-bit i just updated fpc trunk and lazarus trunk... fpc compiled ok... lazarus fails with lresources.pp(3089,67) Error: Identifier not found RT_RCDATA Add the windows-unit to the uses section of lresources as a quick fix. i hesitate to do that for several reasons... but i'm also interested in what changed elsewhere to break this... the lresources.pp file that i have is dated 2014 Mar 17 10:02... i've looked through the svn log of the last few days since my last update and haven't found anything obvious but i've also not dug in very deeply... thanks for your reply! -- NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TWin32WSCustomX class
On 11/10/2014 3:27 PM, Frederic Da Vitoria wrote: 2014-11-09 12:27 GMT+01:00 Antônio antoniog12...@gmail.com: Sorry for the big message, Gnail hides me the rest of the message. After clicking on the answer button, press Down twice (which selects the ellipsis) then press Enter and voilà, you get the message contents, which you can edit as you like. But I agree GMail makes this unnecessarily complicated. FWIW: this is why i use thunderbird (or another local storage mail client) and pull my mail off of gmail's servers using POP3 to my local machine to handle in a traditional manner ;) -- NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] lazarus trunk compile fails with fpc trunk
On 11/6/2014 4:41 AM, Joost van der Sluis wrote: On 11/06/2014 01:18 AM, waldo kitty wrote: On 11/5/2014 10:14 AM, Joost van der Sluis wrote: On 11/04/2014 04:50 PM, waldo kitty wrote: i updated my fpc trunk last night to 28981 and this morning i updated my lazarus trunk to 46747... fpc built properly with no problems... lazarus, on the other hand, gave me the following failure output... $004AA2F3 TABSTRACTEXTERNALTOOL__LEAVECRITICALSECTION, line 1178 of ideexterntoolintf.pas $004B43E7 TEXTERNALTOOL__SETTHREAD, line 570 of exttools.pas Could you try with fpc-trunk revision 28964? It could be that 28965 introduces this problem. But I want to know for sure before I pass this one to Jonas. (I also see that you are on Windows... well, please try 28964, then we know more) /if/ i did it right then that seems to have fixed it... i was able to get back to r28964 in FPC and get it compiled after a distclean (which i normally do before updating)... after that i ran my normal updatelaz script which pulled some new code and the built to completion... it looks like it went ok... Ok, if you now want to update to r28965 and try again. If that one fails, please create a bug-report for fpc. And include all this information. i followed the same method to move to FPC's r28965, built it ok, ran my updatelaz script which pulled one or two new files for lazarus and it also built properly... i don't know if i adjusted FPC to the revisions properly though... i didn't revert anything... i just told tortoise to update to revision both times... the first time to move back to r28964... then again to move up to r28965... did i not do that properly?? -- NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] lazarus trunk compile fails with fpc trunk
On 11/5/2014 10:14 AM, Joost van der Sluis wrote: On 11/04/2014 04:50 PM, waldo kitty wrote: i updated my fpc trunk last night to 28981 and this morning i updated my lazarus trunk to 46747... fpc built properly with no problems... lazarus, on the other hand, gave me the following failure output... $004AA2F3 TABSTRACTEXTERNALTOOL__LEAVECRITICALSECTION, line 1178 of ideexterntoolintf.pas $004B43E7 TEXTERNALTOOL__SETTHREAD, line 570 of exttools.pas Could you try with fpc-trunk revision 28964? It could be that 28965 introduces this problem. But I want to know for sure before I pass this one to Jonas. (I also see that you are on Windows... well, please try 28964, then we know more) i'll try but i've never backed up to a specific revision... definitely not with tortoiseSVN... but i'll take a look and see what i can do... -- NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] lazarus trunk compile fails with fpc trunk
On 11/5/2014 10:14 AM, Joost van der Sluis wrote: On 11/04/2014 04:50 PM, waldo kitty wrote: i updated my fpc trunk last night to 28981 and this morning i updated my lazarus trunk to 46747... fpc built properly with no problems... lazarus, on the other hand, gave me the following failure output... $004AA2F3 TABSTRACTEXTERNALTOOL__LEAVECRITICALSECTION, line 1178 of ideexterntoolintf.pas $004B43E7 TEXTERNALTOOL__SETTHREAD, line 570 of exttools.pas Could you try with fpc-trunk revision 28964? It could be that 28965 introduces this problem. But I want to know for sure before I pass this one to Jonas. (I also see that you are on Windows... well, please try 28964, then we know more) /if/ i did it right then that seems to have fixed it... i was able to get back to r28964 in FPC and get it compiled after a distclean (which i normally do before updating)... after that i ran my normal updatelaz script which pulled some new code and the built to completion... it looks like it went ok... -- NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] lazarus trunk compile fails with fpc trunk
i updated my fpc trunk last night to 28981 and this morning i updated my lazarus trunk to 46747... fpc built properly with no problems... lazarus, on the other hand, gave me the following failure output... lazarus update processing steps... * CMND: make distclean * CMND: TortoiseProc /command:update /path:c:\freepascal\laz * CMND: make OPT=-gl -gh -dHEAPTRC_WINDOW lazbuild lcl basecomponents starter bigidecomponents lhelp * CMND: lazbuild.exe --build-ide=-gl -gh -dHEAPTRC_WINDOW --build-mode=debug ide [quote=lazarus compile log] [chomp 7375 lines] (3104) Compiling synpropertyeditobjectlist.pas TExternalTool.DoExecute Title=Compiling package TurboPowerIProDsgn 0.0 Process.CurrentDirectory=C:\freepascal\laz\components\turbopower_ipro\design\ Executable=c:\freepascal\fpc\trunk\bin\i386-win32\fpc.exe Params: -B -MObjFPC -Scgi -O1 -g -gl -vewnhibq -FuC:\freepascal\laz\packager\units\i386-win32 -FuC:\freepascal\laz\components\lazutils\lib\i386-win32 -FuC:\freepascal\laz\lcl\units\i386-win32 -FuC:\freepascal\laz\lcl\units\i386-win32\win32 -FuC:\freepascal\laz\components\cairocanvas\lib\i386-win32\win32 -FuC:\freepascal\laz\components\lazcontrols\lib\i386-win32\win32 -FuC:\freepascal\laz\components\ideintf\units\i386-win32\win32 -FuC:\freepascal\laz\components\printers\lib\i386-win32\win32 -FuC:\freepascal\laz\components\turbopower_ipro\units\i386-win32\win32 -FuC:\freepascal\laz\components\turbopower_ipro\design\ -FUC:\freepascal\laz\components\turbopower_ipro\design\lib\i386-win32\win32\ -l -dLCL -dLCLwin32 turbopoweriprodsgn.pas Hint: (11030) Start of reading config file c:\freepascal\fpc\trunk\bin\i386-win32\fpc.cfg Hint: (11031) End of reading config file c:\freepascal\fpc\trunk\bin\i386-win32\fpc.cfg Free Pascal Compiler version 2.7.1 [2014/11/03] for i386 Copyright (c) 1993-2014 by Florian Klaempfl and others (1002) Target OS: Win32 for i386 (3104) Compiling turbopoweriprodsgn.pas (3104) Compiling ipidehtmlcontrol.pas C:\freepascal\laz\components\synedit\design\allsyneditdsgn.pas(10,3) Hint: (5023) Unit SynDesignStringConstants not used in allsyneditdsgn (1008) 971 lines compiled, 7.3 sec (1022) 3 hint(s) issued C:\freepascal\laz\components\turbopower_ipro\design\ipidehtmlcontrol.pas(73,22) Hint: (5024) Parameter Sender not used C:\freepascal\laz\components\turbopower_ipro\design\ipidehtmlcontrol.pas(74,27) Hint: (5024) Parameter Sender not used C:\freepascal\laz\components\turbopower_ipro\design\ipidehtmlcontrol.pas(39,36) Hint: (5024) Parameter Sender not used C:\freepascal\laz\components\turbopower_ipro\design\ipidehtmlcontrol.pas(39,64) Hint: (5024) Parameter URL not used C:\freepascal\laz\components\turbopower_ipro\design\ipidehtmlcontrol.pas(40,36) Hint: (5024) Parameter Sender not used C:\freepascal\laz\components\turbopower_ipro\design\ipidehtmlcontrol.pas(40,64) Hint: (5024) Parameter URL not used C:\freepascal\laz\components\turbopower_ipro\design\ipidehtmlcontrol.pas(42,35) Hint: (5024) Parameter Sender not used C:\freepascal\laz\components\turbopower_ipro\design\ipidehtmlcontrol.pas(42,63) Hint: (5024) Parameter URL not used C:\freepascal\laz\components\turbopower_ipro\design\ipidehtmlcontrol.pas(43,18) Hint: (5024) Parameter aPostData not used C:\freepascal\laz\components\turbopower_ipro\design\ipidehtmlcontrol.pas(44,36) Hint: (5024) Parameter Sender not used C:\freepascal\laz\components\turbopower_ipro\design\ipidehtmlcontrol.pas(46,33) Hint: (5024) Parameter Sender not used C:\freepascal\laz\components\turbopower_ipro\design\ipidehtmlcontrol.pas(47,43) Hint: (5024) Parameter Sender not used C:\freepascal\laz\components\turbopower_ipro\design\ipidehtmlcontrol.pas(47,71) Hint: (5024) Parameter URL not used C:\freepascal\laz\components\turbopower_ipro\design\ipidehtmlcontrol.pas(48,35) Hint: (5024) Parameter Sender not used (1010) Writing Resource String Table file: ipidehtmlcontrol.rsj (1008) 407 lines compiled, 5.7 sec (1022) 16 hint(s) issued An unhandled exception occurred at $004AA2F3: EAccessViolation: Access violation TExternalTool.DoExecute Title=Clean Lazarus Source Process.CurrentDirectory=C:\freepascal\laz\ Executable=C:\freepascal\binutils\i386-win32\make.exe Params: cleanide -w $004AA2F3 TABSTRACTEXTERNALTOOL__LEAVECRITICALSECTION, line 1178 of ideexterntoolintf.pas $004B43E7 TEXTERNALTOOL__SETTHREAD, line 570 of exttools.pas $004B7417 TEXTERNALTOOLTHREAD__SETTOOL, line 1446 of exttools.pas $004B833D TEXTERNALTOOLTHREAD__DESTROY, line 1730 of exttools.pas $00411872 C:\freepascal\binutils\i386-win32\make.exe: Entering directory `C:/freepascal/laz' C:/freepascal/binutils/i386-win32/make.exe -C ide cleanide $0041576E $76AED3C9 $77401603 $774015D6 make.exe[1]: Entering directory `C:/freepascal/laz/ide' c:/freepascal/binutils/i386-win32/rm.exe -f Heap dump by heaptrc unit 112226 memory blocks allocated : 5889338/6238168 11 memory blocks freed : 5889134/6237960 4 unfreed memory blocks : 204 True heap size :
Re: [Lazarus] Detecting if a remote web server is running
On 10/30/2014 7:29 AM, Felipe Monteiro de Carvalho wrote: On Thu, Oct 30, 2014 at 10:44 AM, Richard Mace richard.m...@gmail.com wrote: Hi All, What's the most reliable way of detecting whether a remote website is responding? maybe ping? ping might tell you if the IP address is active but that's all... it won't tell you if the server is running or servicing requests... you have to request something from the server to see if it is servicing requests... the easiest and smallest would be to request the headers (only) from the root... -- NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Find dialog too tight for translations
On 10/27/2014 5:45 PM, Giuliano Colla wrote: Il 25/10/2014 19:13, waldo kitty ha scritto: On 10/24/2014 5:34 PM, Giuliano Colla wrote: Taking into account all suggestions, I came out with two possible layouts: Option 1 = Buttons at the bottom of the form (like in my previous version) Option 2 = Buttons at the right of the form (like in the original version) i forgot to ask in my previous post... have you seen the find/replace dialog in notepad++? it is tabbed with four tabs and is similar to your option 2... No, I didn't because I don't use Windows. Therefore I'm unfamiliar with Windows-only applications. i'll try to attach the four views, one of each tab in the dialogue... this is for informational purposes only and to maybe help develop further ideas... one thing i found interesting is that while one tab might appear to have a lot of white space, that space is used when other tabs are selected as you can see in each image... my cropping may not be accurate but the dialog's size doesn't change at all when each tab is selected... [aside][ramble] i use notepad++ a lot... especially for editing multiple files... largest project so far was editing 1000 data files with searches and replaces across all of them at once... they were for a satellite tracking program's ability to use different common names for the objects... when you have hundreds of objects that result from explosions or collisions and you want to use a different name, it comes in handy to work across multiple files as well... [/ramble] [/aside] Well, if you had had a nicer Find/Replace dialogue, you could have developed a Lazarus application (possibly multi-threaded) to perform your simultaneous search/replace across thousands of files ;-) hahahaha!! nice topic save ;) but seriously, what i needed at the time was an editor to handle many many text files at once and allow me to see and approve each change... i definitely didn't need to be trying to develop my own editor ;) in any case, here's the attachments... hopefully ;) -- NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Find dialog too tight for translations
On 10/24/2014 5:34 PM, Giuliano Colla wrote: Taking into account all suggestions, I came out with two possible layouts: Option 1 = Buttons at the bottom of the form (like in my previous version) Option 2 = Buttons at the right of the form (like in the original version) i like them both... option 2 is like a lot of stuff that i work with... i have no preference between them at this time... maybe provide both so that implementers can choose which they prefer in their project? -- NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Find dialog too tight for translations
On 10/24/2014 5:34 PM, Giuliano Colla wrote: Taking into account all suggestions, I came out with two possible layouts: Option 1 = Buttons at the bottom of the form (like in my previous version) Option 2 = Buttons at the right of the form (like in the original version) i forgot to ask in my previous post... have you seen the find/replace dialog in notepad++? it is tabbed with four tabs and is similar to your option 2... [aside][ramble] i use notepad++ a lot... especially for editing multiple files... largest project so far was editing 1000 data files with searches and replaces across all of them at once... they were for a satellite tracking program's ability to use different common names for the objects... when you have hundreds of objects that result from explosions or collisions and you want to use a different name, it comes in handy to work across multiple files as well... [/ramble] [/aside] -- NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Find dialog too tight for translations
On 10/24/2014 4:39 AM, Jürgen Hestermann wrote: Why is the Direction box placed on the right of all other options? IMO it is just another option as all the others so it should be put below these other options. This would also avoid the problem of moving this box when text becomes long. this is similar to my suggestion posted previously ;) -- NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Find dialog too tight for translations
On 10/23/2014 8:12 AM, Giuliano Colla wrote: I've found a problem in the find dialogue, when used in a language different from English. In English it's already a bit crowded: http://www.bononiadocta.it/Lazarus/Finddialog.en.png but once translated it becomes horrible: is that your layout? i've never used it but my first suggestion would be to place direction under text and the forward/backward selectors under the text field... that moves everything else down a line... ignore me if i'm (way?) off-base ;) -- NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Redundant text on project buttons
On 10/14/2014 5:20 AM, hinsta...@yandex.ru wrote: These urgently need to be reduced to icons with no text http://s30.postimg.org/5hxkrzfkx/LWaste.png why? and why urgently?? my personal preference is text only or text with icon if text only is not available... i never have liked just plain icons with no indication of their action... -- NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Fwd: New Lazarus pascal conference
On 10/14/2014 6:31 PM, Giuliano Colla wrote: Il 15/10/2014 00:14, Graeme Geldenhuys ha scritto: On 2014-10-14 06:11, Vincent Snijders wrote: It is not in Amsterdam, but in Leiden. I knew that, but 99.9% of the people have probably never heard of Leiden, so considering that Amsterdam is 15 minutes away I listed the more well known city. :) You underestimate the list readers! that can easily work both ways ;) Whoever has taken an elementary course in physics has learned about the Leiden bottle, or Leiden jar, yes and yes... the grand-grandfather of modern capacitors! :-) never thought about that aspect... plus, the town's name was just a town's name when i read it... as it was just a town name that meant nothing to me i, too, was curious as to the location even though i will probably never travel outside the US again... so while 2 + 2 = 4, i only had 2 + 0 ;) no offense intended... -- NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] white popup hint box
On 9/15/2014 7:36 PM, Rik van Kekem wrote: On 16 september 2014 01:17:55 CEST, waldo kitty wkitt...@windstream.net wrote: as noted previously, i don't use any installer... i pull trunk from the repository and compile it as per my previously posted command lines... Isn't Lazarus 1.3 r42488 a really old version? (November 2013?) Or am I seeing this wrong? you are seeing it right... there appears to be a problem with Svn2RevisionInc not being able to read and parse the info from tortoisesvn's newer version for some reason... the actual revision of lazarus i'm running is 46236 according to the properties of my lazarus directory... [time passes] it seems that the newer tortoisesvn uses a sqlite database to store revision info in... at least, there's a wc.db file in the .svn directory and a quick look at it with a binary file viewer tool shows that it starts with sqlite but i don't know if it contains the desired information for Svn2RevisionInc to gather and use... looking at the code for Svn2RevisionInc, the info that Svn2RevisionInc wants is definitely not in the entries file... that one only has three bytes in it now with this version of tortoisesvn... i've just spent the last while working out a .BAT file named svnversion.bat in the hopes that Svn2RevisionInc would execute it... i'm assuming that Svn2RevisionInc expects the file to be in the path so i placed it in the same place as tortoisesvn's SubWCRev.exe tool... the bat file calls SubWCRev.exe with the necessary path as fed from Svn2RevisionInc... SubWCRev creates an output file which the .BAT file types so that Svn2RevisionInc can get the revision number from stdout but Svn2RevisionInc doesn't even seem to execute the svnversion.bat file as desired... this is easy to see because the intermediate file for the bat file is not created and the resulting revision.inc file contains an empty string for the RevisionStr instead of Unknown as expected... i'm not sure how to fix it so that Svn2RevisionInc can get the revision number for the revision.inc file and since it is now almost 0300 in the morning my local time and i've been up for 24+ hours (again), i'm going to go to bed and try to get an hour or two of sleep [sigh] -- NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] white popup hint box
On 9/16/2014 2:06 AM, Juha Manninen wrote: On Tuesday, September 16, 2014, Rik van Kekem r...@graficalc.nl mailto:r...@graficalc.nl wrote: Isn't Lazarus 1.3 r42488 a really old version? (November 2013?) Or am I seeing this wrong? It is older, from August 2013. More than a year old. Waldo should update sometimes. You will get many goodies with the latest revision. i started this topic by stating that i had just updated for the first time in 4 months... previous to that i had been updating at least once every 2 months... please see my last post where i've fought with svn2revisioninc trying to get it to work with a bat file to replicate svnversion at least as far as getting the revision number from tortoisesvn's tool... -- NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] white popup hint box
On 9/15/2014 7:15 AM, Anthony Tekatch wrote: On Sun, 14 Sep 2014 23:22:26 -0400, waldo kitty wkitt...@windstream.net wrote: i'm also quite confused how you saw that image with that section yellowed... i've looked at the same image on several machines and see only white on white :/ I find this interesting. I can see a very light yellow pop-u on your supplied screen-shot. I used GIMP to confirm those HTML color values: The white background = ff The popup = e1 well, i'll be... i just check this in the tool i used to create the graphic... i use the printscreen key to capture the screen and then pasted that into the tool where i then cropped it down so it wasn't too large for the list... the tool i used is an older paintshop pro and it causes the system to change the color scheme to windows vista basic... using the eye dropper tool, it took me a few minutes to realize the RGB values were 255,255,225... at some point, i had leaned over sideways and i did notice that there was a yellow tint to that popup... if i am at a roughly 45 degree angle left or right of the laptop screen, then i see the very light yellow... if i'm 45 degrees above or below, then it is kind of greenish with the editor's white background looking blue... I just checked my popup on Lazarus Ver 1.3, and it is definitely white on white, i'm glad i'm not the only one being fooled by this :) i'd still rather have a proper border around the popup, though :) although I had once manually changed some settings in the Linux gtkrc setting file pointed to by ~/.gtkrc-2.0: as noted above, this is on a vista machine so no gtk stuffs here for me to edit ;) filename: /usr/share/themes/Aurora/gtk-2.0/gtkrc I once had light gray text on white, so I changed the following line of that file to back tooltip fg on white tooltip bg as follows: gtk_color_scheme = fg_color:#00\nbg_color:#C7C7C7\nbase_color:#ff\ntext_color:#00\nselected_bg_color:#247EB3\nselected_fg_color:#ff\ntooltip_bg_color:#FF\ntooltip_fg_color:#00 interesting :) -- NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] white popup hint box
On 9/15/2014 10:05 AM, Rik van Kekem wrote: waldo kitty wrote: i'm also quite confused how you saw that image with that section yellowed... i've looked at the same image on several machines and see only white on white :/ Like Anthony already found out, even if it's white on screen it really is a very light shade of yellow. You can see this by adjusting the brightness of your screen but with a laptop that's a bit more difficult. I've seen multiple times, especially with laptops, that you can't see these subtle colors. (For me, with a desktop-screen, the difference is really visible) i'll have to try one of the other systems that still has a crt... most every system here has a flatscreen display... i think they're all lcd, too... If you don't want to change your theme you can change it in the source of Lazarus itself. But your other programs will keep a white hint. I don't know how to make a clearer border but the color is here: Lazarus_dir\LCL\Include\hintwindow.inc // Color := clInfoBk; Color := clYellow; // - for instance But clInfoBk is used a lot more throughout the Lazarus IDE so it might be better to change your theme. Maybe somebody else could hunt down the border-drawing for this tooltip (which i couldn't find off hand). i've changed the theme for now but yes, it would really be nice if someone would fix the border so it is grey or black or such... perhaps it might be a good thing to add these color settings to the options-colors area, too? eg: tool tip border : #00 tool tip background : light grey or how ever they are specified... it is much too deep in the innards of lazarus for me to even think about looking for... especially with my ancient TP/BP procedural thought process methodology ;) -- NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] white popup hint box
On 9/15/2014 4:02 PM, Juha Manninen wrote: I also see a distinctive yellow color. Waldo Kitty, you should go to see an eye doctor, you are suffering from color blindness. :) hahahahaha! might be getting there in my old age ;) You all noticed the hint window's color but nobody noticed it renders HTML nicely, giving a professional touch to hint and info windows. i haven't been able to see that yet... i had a time trying to do the screen grab because as soon as i'd hit the print screen key, the popup would go away... i had to try 5 or 6 times before i got the image i posted showing it... The same effect was available also earlier by installing TurboPowerIProDsgn package. Now some bugs are fixed (see #20202) and it is part of lazarus BigIde by default. nice! i have generally installed that in the past but didn't understand this was what it was for... i haven't gotten around to trying to use it, either... it has been on my TODO list for a long while and no projects i've been working on have needed it... probably because they're mostly all command line text mode programs, i guess... On Mon, Sep 15, 2014 at 5:05 PM, Rik van Kekem r...@graficalc.nl wrote: I don't know how to make a clearer border but the color is here: Lazarus_dir\LCL\Include\hintwindow.inc // Color := clInfoBk; Color := clYellow; // - for instance That will not help because the THintWindow.Canvas is not used. Instead TurboPowerIProDsgn registers its own HTML renderer component there. If you want to study the code, here are some pointers: IdeHelpIntf (in package IdeIntf) has these events through which TurboPowerIProDsgn registers itself: CreateIDEHTMLControl: TCreateIDEHTMLControlEvent = nil; CreateIDEHTMLProvider: TCreateIDEHTMLProviderEvent = nil; Code that supports both the default text hints and registered hint renderers is now refactored into THintWindowManager class, also in IdeHelpIntf unit. Earlier such code was spread in different places, including OI and SE. i knew that someone (you i think) had been working on this by the posts in the various lists... i'm glad to see that your work is coming along nicely... There is a small border around hint windows. On Windows there is even a nice shadow so it looks like lifted up. I don't know what you people are complaining about. I tested with Windows, GTK2 and QT widgetsets. i get the shadow but not the border... it is somewhat unsettling to have a box popup that might not be noticed as a popup box at first... initially i had thought that some sort of formatting thing had happened and i moved to try to clear it up when the box disappeared with the text i was going to try to clear out... it took me a few minutes to realize that it was a popup and that it was due to my mouse having moved over something that had a hint box associated with it... i actually don't mind the white (or very light yellow) background of the popup box but the missing border is something else... why it is missing i have no idea... that's why i posted asking where i need to go to adjust the colors for those items ;) -- NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] white popup hint box
On 9/15/2014 4:09 PM, Juha Manninen wrote: Right, Waldo's screenshot does not have a border, it only has a shadow. In my Windows 7 there is both a border and a shadow. i'm on vista (32bit) and i think i have their aero thing turned on on this box... on most i generally turn all the fancy stuffs off so the machine responds faster... -- NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] white popup hint box
On 9/15/2014 4:55 PM, Rik van Kekem wrote: On 15-09-2014 22:09, Juha Manninen wrote: Right, Waldo's screenshot does not have a border, it only has a shadow. In my Windows 7 there is both a border and a shadow. Now i see what you mean !! But for this to work you need the package turbopoweriprodsgn.lpk installed. And this is not done with a default installation. I just added turbopoweriprodsgn.lpk, rebuild lazarus and i now do get a greyish border completely around the window. well eff me!! (see attachment) i would never have thought of adding that package... it actually was not installed in this lazarus although i have had it installed in the past... i guess i left it out the last time i reinstalled because i hadn't seen any benefit and simply hadn't gotten to it on my TODO list to see what it could offer me... Solved (but of course it should be default and i guess the other/default hint-rendering leaves something to be desired.) yeah, i don't do bigide as was mentioned in the juha's previous message... i build from trunk in the repository using the following in my build script... make OPT=-gl -gh -dHEAPTRC_WINDOW lazbuild lcl basecomponents starter bigidecomponents lhelp lazbuild.exe --build-ide=-gl -gh -dHEAPTRC_WINDOW --build-mode=debug ide generally speaking, my miscellaneousoptions.xml is used but my script has the ability of disabling it by renaming it so it isn't found... in this case, it is used and i don't recall the testing that was being done before where i needed to be able to disable miscellaneousoptions.xml... probably when trying to work with one of the docking manager things which i don't use any more for various reasons... -- NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] white popup hint box
On 9/15/2014 5:24 PM, Juha Manninen wrote: On Monday, September 15, 2014, Rik van Kekem r...@graficalc.nl wrote: But for this to work you need the package turbopoweriprodsgn.lpk installed. And this is not done with a default installation. Yes it is. As I explained it is now part of bigide. The next version 1.4 installer will have it by default. as noted previously, i don't use any installer... i pull trunk from the repository and compile it as per my previously posted command lines... in retrospect, i guess i should have filed a bug report and then amended it when we discovered that the turbopoweriprodsgn was necessary for it to appear correctly... perhaps there should be some checking code to see if the turbopoweriprodsgn routines are available and if not, then render the popups as desired in the old way with a border and background color with or without the html capabilities... Does this discussion mean that the old text hint window also changed its color? I refactored THintWindow but I did not touch the color IIRC. TBH, i don't know... all i know is that i was not able to immediately recognize the popup for what it was... -- NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] white popup hint box
i've just updated both of my trunk FPC and LAZ... it has been four months since my last update... when i hovor over something and lazarus pops up a hint box, it is all white except for the shadow border on the right and bottom... where do i go to adjust the color of the border so i can see it or to at least make the background of the popup somewhat grey? Lazarus 1.3 r42488 FPC 2.7.1 r28663 i386-win32-win32/win64 please see the attached png image for clarification... -- NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] white popup hint box
On 9/14/2014 5:22 PM, Rik van Kekem wrote: On 14-09-2014 20:56, waldo kitty wrote: i've just updated both of my trunk FPC and LAZ... it has been four months since my last update... when i hovor over something and lazarus pops up a hint box, it is all white except for the shadow border on the right and bottom... Are you sure you're seeing that hint-windows in (real) white? yes, i'm pretty sure... Are you on a laptop or screen-setting with high intensity? ummm, yes, this is a laptop... high intensity? i don't think so... i've not had this problem before this latest update... For me the hint-window in YOUR screenshot is light-yellow (as it should be for my theme). The hint-window is drawn in the special theme color clInfoBk (which in turn looks at the color in your theme for the hint-window). ugh... i don't want to change my default theme just to try to satisfy some program that has suddenly changed... i don't see this with other programs but then i don't know what they are doing, either... i just know that they haven't changed like this... So before hunting down this setting in the source of Lazarus you might want to adjust your theme or color-settings or your screen. Other application will use the same light-setting for displaying hints. Also see: http://wiki.freepascal.org/Colors#Example:_clInfoBk.2C_clInfoText i'll look but i'm pretty apprehensive and, at the outset, not a happy camper for this :/ -- NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] white popup hint box
On 9/14/2014 5:33 PM, Rik van Kekem wrote: On 14-09-2014 23:22, Rik van Kekem wrote: On 14-09-2014 20:56, waldo kitty wrote: i've just updated both of my trunk FPC and LAZ... it has been four months since my last update... when i hovor over something and lazarus pops up a hint box, it is all white except for the shadow border on the right and bottom... B.T.W. if you really want to change the background of your hint-window its best you do it system-wide in your theme. You could do it like this on Windows 7: thanks for the hint... i'll try to apply it to this last vista installation... we have dumped winshite for numerous reasons... this may be another nail that keeps the coffin shut... everything else is linux or OS/2 eCS... thanks for the assist! ;) -- NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] white popup hint box
On 9/14/2014 5:33 PM, Rik van Kekem wrote: On 14-09-2014 23:22, Rik van Kekem wrote: On 14-09-2014 20:56, waldo kitty wrote: i've just updated both of my trunk FPC and LAZ... it has been four months since my last update... when i hovor over something and lazarus pops up a hint box, it is all white except for the shadow border on the right and bottom... B.T.W. if you really want to change the background of your hint-window its best you do it system-wide in your theme. You could do it like this on Windows 7: Right-click your desktop and choose Personalize. At the bottom choose Windows Color In the next screen choose Advanced appearance settings. i had to hunt it down in vista but yes, that works for the background but there is (still) no border which i'd rather have instead of just a floating polygon of a different shade with no border... i'm also quite confused how you saw that image with that section yellowed... i've looked at the same image on several machines and see only white on white :/ -- NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Debian: fpc-source update
On 5/1/2014 7:16 AM, Mattias Gaertner wrote: On Thu, 01 May 2014 12:10:32 +0200 John Landmesser jmlandmes...@gmail.com wrote: [...] do i have to remove version 2.6.2 manually? If i do apt-cache show fpc-source there is no line replaces .., so i think its my job to remove the old fpc-source 2.6.2?? But why?? You can have both. They don't interfere. So, yes, you have to remove old versions manually when you don't need them anymore. by manually, would that be something like apt-get remove fpc-2.6.2 or rm /f path/to/fpc/2.6.2 ?? -- NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Memory leak hunt request
On 4/26/2014 6:08 AM, Graeme Geldenhuys wrote: On 2014-04-26 10:31, Reinier Olislagers wrote: I'm often a bit dumb when it comes to memory management/memory leaks - probably because of my managed code experience (yes, excuses, excuses)... From my experience, develop your software from the ground up with Heaptrc unit enabled (compiler option -gh). It is MUCH easier to fix a memory leak the second you created it, compared to 6 months down the line. +1~ can't emphasize this enough... too many times things are developed without stack, heap and/or pointer tracking which comes back to haunt later when they are disabled for release compilations... As for your question about how to resolve them. Simply enable -gh, run your app from a console window. Start simple. eg: Run the app, then immediately exit. Do memory leaks occur? If so, analyse the heaptrc output. Trace the line numbers and call stack. Go through the affected code with a fine tooth comb. Fix and repeat the test. Did the leak count reduce. Once all application startup leaks have been fixed, move to another dialog, and repeat the whole process. Yes, it's painful and boring as hell. Hence my suggestion on starting development with -gh enabled and it makes it much easier. you've got this nailed ;) -- NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] OpenDocument and Linux Mint
On 4/16/2014 2:32 PM, silvioprog wrote: 2014-04-16 15:30 GMT-03:00 Junior lazarus.li...@gmail.com: OpenDocument('./test.txt'); Same error. what is the error? you haven't told us that piece of important information ;) -- NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] OpenDocument and Linux Mint
On 4/16/2014 3:39 PM, silvioprog wrote: 2014-04-16 16:34 GMT-03:00 waldo kitty wkitt...@windstream.net mailto:wkitt...@windstream.net: [...] what is the error? you haven't told us that piece of important information ;) Oops, sorry! XD The file doesn't open. I click the button and nothing happens. and you don't get any kind of exception or other error results?? -- NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] SSL connection
On 3/4/2014 7:23 AM, Santiago A. wrote: Hello: I need to connect to a web with https. In delphi I used synapse sometimes and Indy otrher times. i use synapse... after it was updated for my chosen OS (OS/2 aka eCS) and i gathered working DLLs (crypto and ssl) for my OS, it worked great... *nix and winwhatever should be easier... i want to thank tomas hajny again for doing the necessary synapse code updates so that it works for OS/2 and providing them back to the synapse project :) -- NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] strange linux problem
On 2/19/2014 8:42 AM, brian wrote: [...] Definitely not the first. I've written out the full paths to a log file, and they are correct - editing the logs and putting an 'ls ' in front of the file names provides the expected results. The drive is powered down overnight, and I'm the only user, so I can't see how there could be a server lock unless there's something wrong with the drive. I've seen nothing else to indicate a faulty router. have you tried adding at least a 1/4th second up to maybe a 1 second sleep just to try to ensure that it isn't a bottleneck somewhere? it could be the samba stuff... my XP machine used to drop its samba shares on a FreeNAS (bsd) any time there was a huge amount of traffic (copying several hundred megs of randomly sized small files, copying one huge [up to 2G] file, and similar) between the XP box and the NAS... the only way to regain access to the NAS was to reboot the XP box... no other machines exhibited this problem... it was finally solved when the XP box ate itself for lunch one day :/ -- NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] play video and music from the web
On 2/13/2014 9:06 AM, duilio foschi wrote: Hi Andrew, which is a conservative way to go for a music player on the web ? Which is method used by - say - YouTube ? youtube was using a flash video player thing... i don't know what they are using now that google owns them... i've not tried to save any of their videos to local storage in a year or two... -- NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] FPC and Lazarus trunk
On 1/13/2014 8:15 AM, Marco van de Voort wrote: On Sat, Jan 11, 2014 at 01:54:06PM -0500, waldo kitty wrote: that's why i run make clean and/or make distclean before updating from SVN... That should remove it from the checkout dirs. But if you do a separate install step, the place you install too also should be sanitized. (though I have to admit I only do that on error myself too) yeah, AFAIK, i don't do any type of install step... in the following, taskX is displayed on screen and in the log... stepX is the actual command executed for the task... set task1=before svn update... set step1=make distclean set task2=updating lazarus from svn... set step2=TortoiseProc /command:update /path:%myLAZpath% set task3=build lazbuild, startlazarus and necessary tools... set step3=make OPT=-gl -gh -dHEAPTRC_WINDOW lazbuild lcl basecomponents starter bigidecomponents lhelp set task4=save existing lazarus.exe... set step4=if exist lazarus.exe copy /y lazarus.exe lazarus.save.exe set task5=Debug IDE set step5=lazbuild.exe --build-ide=-gl -gh -dHEAPTRC_WINDOW --build-mode=debug ide -- NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] FPC and Lazarus trunk
On 1/13/2014 8:15 AM, Marco van de Voort wrote: On Sat, Jan 11, 2014 at 01:54:06PM -0500, waldo kitty wrote: that's why i run make clean and/or make distclean before updating from SVN... That should remove it from the checkout dirs. But if you do a separate install step, the place you install too also should be sanitized. (though I have to admit I only do that on error myself too) ahh!! i see now that you are speaking of FPC and not LAZ... i've now removed the unit directory from both of my sets of dirs... FPC seems to have built OK and now LAZ is making its run... so far, it looks to be OK as well... especially since my last LAZ build log only hit 54K and the one for this build is well on its way to the ~450K that i normally see ;) [time passes] looks like it worked! :) the FPC revision is/was 26447 but the code doesn't pull that info from this TortiseSVN... i suspect this is because of a database format change... been like this since i updated some time back :/ Lazarus 1.3 r42488 FPC 2.7.1 i386-win32-win32/win64 -- NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Building lazarus 1.2 fixes with fpc 2.6 fixes broken.
On 1/13/2014 10:52 AM, Marco van de Voort wrote: On Mon, Jan 13, 2014 at 03:26:16PM +0200, Dimitrios Chr. Ioannidis wrote: PPU Loading /usr/lib/fpc/2.7.1/units/i386-linux/rtl/variants.ppu well the problem i see is reg. the 2.6 fixes branch not trunk. I hope the selective quoting says all :-) when i went back and looked at previous messages and the responses in my own thread, i was finally able to open my eyes and see that the problem was in the FPC installation... that allowed me to correct the error as noted a few minutes ago in the other thread ;) for me, the easiest fix was to rename *path*/fpc/%fpcversion%/units/i386-%OS% and then rebuild/install FPC followed by the same for LAZ... -- NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] [ANN] Lazarus Manager v0.8
On 1/10/2014 8:57 PM, Reinier Olislagers wrote: On 11/01/2014 01:09, waldo kitty wrote: On 1/10/2014 5:04 PM, Kjow wrote: AFAIK, TortiseSVN has never had a svn.exe... i've always had to use their executable's filename in my scripts... http://stackoverflow.com/questions/2967176/where-is-svn-exe-in-my-machine UPDATE: Recent versions of the TortoiseSVN package can install a discrete svn.exe in addition to the one linked into the GUI binary. It is located in the same bin directory where the main program is installed. and During the installation of TortoiseSVN, check the Command Line Client Tools. This will create the file svn.exe inside the folder C: \ Program Files \ TortoiseSVN \ bin thanks for that bit of information! it is helpful in more than one case ;) -- NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] FPC and Lazarus trunk
On 1/11/2014 9:13 AM, Marco van de Voort wrote: On Fri, Jan 10, 2014 at 07:23:18PM -0500, waldo kitty wrote: [...] PPU Loading C:\freepascal\fpc\trunk\units\i386-win32\rtl\variants.ppu PPU Source: variants.pp not available Recompiling variants, checksum changed for System Fatal: Can't find unit variants used by db Fatal: Compilation aborted make[1]: *** [fcllaz.ppu] Error 1 make[1]: Leaving directory `c:/freepascal/laz/packager/registration' make: *** [registration] Error 2 Wipe (or move out the compiler's unit path) the rtl/ directory in the installed FPC, and rebuild FPC. i will do that when power returns... extremely high winds have lead to a lot of damage in this area :( Note that not erasing the unit dir when doing a snapshot update is a bad idea for exactly this reason (moving an unit in SVN will permanently leave multiple compiled versions in the units dir) that's why i run make clean and/or make distclean before updating from SVN... past discussions say that this should avoid this problem... but, as you and another noted, evidently the fpc config is pointing to the (now old) rtl directory and that needs to be changed, too... in any case, thanks for all responses on this... when power returns, i'll be revisiting this ;) -- NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] [ANN] Lazarus Manager v0.8
On 1/10/2014 5:04 PM, Kjow wrote: Well, if Lazarus Manager can't use svn nothing will work. There aren't restriction on which svn client to use, it just need a fully working svn command line (command prompt). If no svn client if found (it check the existence of svn command on system path (I use this code: FindDefaultExecutablePath('svn'): Boolean;) it will download and ask to install the client that has his url on first tab. AFAIK, TortiseSVN has never had a svn.exe... i've always had to use their executable's filename in my scripts... eg: for FPC - TortoiseProc /command:update /path:%myFPCdir% for LAZ - TortoiseProc /command:update /path:%myLAZdir% then there's that the version i used on w98 and w2k was able to have the revision number pulled out and included in lazarus' about screen but when i screwed up and let my vista box update to a newer version of TortiseSVN, this didn't happen any more... apparently because they changed their .svn data storage format and so svn2revision.inc isn't able to gather that data any more :( i don't know anything about 'their' (TortiseSVN) having any sort of 'bash shell'... AFAIK, there isn't such a beast on winwhatever... in any case, here's the contents of my vista's TortiseSVN installation... dir C:\Program Files\TortoiseSVN\bin Directory of C:\Program Files\TortoiseSVN\bin 06/22/2012 08:35 AMDIR . 06/22/2012 08:35 AMDIR .. 10/10/2009 12:33 PM 1,308 autolist.txt 05/15/2012 11:54 AM14,728 ConnectVPN.exe 05/15/2012 11:54 AM 1,610,120 crshhndl.dll 05/15/2012 11:54 AM45,960 intl3_tsvn32.dll 05/15/2012 11:54 AM 210,312 libaprutil_tsvn32.dll 05/15/2012 11:54 AM 134,024 libapr_tsvn32.dll 05/15/2012 11:54 AM70,536 libsasl32.dll 05/15/2012 11:54 AM 3,059,080 libsvn_tsvn32.dll 05/15/2012 11:54 AM15,752 saslANONYMOUS.dll 05/15/2012 11:54 AM18,824 saslCRAMMD5.dll 05/15/2012 11:54 AM54,152 saslDIGESTMD5.dll 05/15/2012 11:54 AM24,968 saslGSSAPI.dll 05/15/2012 11:54 AM16,264 saslLOGIN.dll 05/15/2012 11:54 AM 528,776 saslNTLM.dll 05/15/2012 11:54 AM16,776 saslPLAIN.dll 05/15/2012 11:54 AM 590,728 SciLexer.dll 05/15/2012 11:54 AM 1,521,544 SendRpt.exe 05/15/2012 11:54 AM 111,496 SubWCRev.exe 05/15/2012 11:54 AM 105,864 SubWCRevCOM.exe 05/15/2012 11:54 AM 263,560 TortoiseBlame.exe 05/15/2012 11:54 AM 199,048 TortoiseIDiff.exe 05/15/2012 11:54 AM 1,980,296 TortoiseMerge.exe 05/13/2012 05:26 PM 230,131 TortoiseMerge_en.chm 05/15/2012 11:54 AM 327,048 TortoisePlink.exe 05/15/2012 11:54 AM 6,986,632 TortoiseProc.exe 05/15/2012 11:54 AM40,328 TortoiseStub32.dll 05/15/2012 11:54 AM 428,936 TortoiseSVN32.dll 05/13/2012 05:25 PM 1,698,989 TortoiseSVN_en.chm 03/11/2007 12:18 PM39,002 TortoiseSVN_error.wav 03/11/2007 12:18 PM49,242 TortoiseSVN_Notification.wav 03/11/2007 12:18 PM14,426 TortoiseSVN_Warning.wav 05/15/2012 11:54 AM 123,272 TortoiseUDiff.exe 05/15/2012 11:54 AM 276,872 TSVNCache.exe 01/05/2007 09:30 PM49 Website.url -- NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] FPC and Lazarus trunk
i've just updated my FPC trunk and now my Lazarus trunk won't compile... *** * TASK: before svn update... * CMND: make distclean * [trim] * * make distclean complete... *** *** * TASK: updating lazarus from svn... * CMND: TortoiseProc /command:update /path:c:\freepascal\laz * * TortoiseProc /command:update /path:c:\freepascal\laz complete... *** *** * TASK: build lazbuild, startlazarus and necessary tools... * CMND: make OPT=-gl -gh -dHEAPTRC_WINDOW lazbuild lcl basecomponents starter bigidecomponents lhelp * make -C packager/registration make[1]: Entering directory `c:/freepascal/laz/packager/registration' c:/freepascal/binutils/i386-win32/rm.exe -f ../units/i386-win32/fcllaz.ppu c:/freepascal/fpc/trunk/bin/i386-win32/ppc386.exe -MObjFPC -Scghi -O1 -g -gl -vewnhi -l -Fu. -FE. -FU../units/i386-win32 -gl -gh -dHEAPTRC_WINDOW -di386 fcllaz.pas Hint: Start of reading config file c:\freepascal\fpc\trunk\bin\i386-win32\fpc.cfg Hint: End of reading config file c:\freepascal\fpc\trunk\bin\i386-win32\fpc.cfg Free Pascal Compiler version 2.7.1 [2014/01/10] for i386 Copyright (c) 1993-2013 by Florian Klaempfl and others Target OS: Win32 for i386 Compiling fcllaz.pas Compiling registerfcl.pas Compiling lazaruspackageintf.pas PPU Loading C:\freepascal\fpc\trunk\units\i386-win32\rtl\variants.ppu PPU Source: variants.pp not available Recompiling variants, checksum changed for System Fatal: Can't find unit variants used by db Fatal: Compilation aborted make[1]: *** [fcllaz.ppu] Error 1 make[1]: Leaving directory `c:/freepascal/laz/packager/registration' make: *** [registration] Error 2 -- NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] What are the prerequisites for compiling Lazarus on a KDE based system?
On 1/5/2014 6:37 AM, Reinier Olislagers wrote: On 05/01/2014 04:47, waldo kitty wrote: On 1/4/2014 4:37 PM, vfclists . wrote: On 4 January 2014 14:28, leledumbo leledumbo_c...@yahoo.co.id mailto:leledumbo_c...@yahoo.co.id wrote: +1!!n i'm running into similar situations building in this way... i've tried trunk for both FPC and LAZ and the defaults give be failures on building the docs... those failures being, mainly, that fpdoc and/or fpmake did not exist... but my last try was at 0500 this morning and i simply started fpcup clean with no previous config files or directories and let it run... RTFM (especially about the docs part) and properly read the failures please. i will try but i've not found a 'manual' as such... fpcup.txt or similar... all i have is the binary that was downloaded... nothing else other than the built-in help... Thanks. you are welcome... i can only try to help make things better when possible ;) BTW: i do like fpcup... i'm still trying to wrap my head around all of its capabilities and functions... nice work :) -- NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] What are the prerequisites for compiling Lazarus on a KDE based system?
On 1/4/2014 4:37 PM, vfclists . wrote: On 4 January 2014 14:28, leledumbo leledumbo_c...@yahoo.co.id mailto:leledumbo_c...@yahoo.co.id wrote: Just check what -lXXX are missing Can you explain it further? I am building Lazarus using fpcup. +1!!n i'm running into similar situations building in this way... i've tried trunk for both FPC and LAZ and the defaults give be failures on building the docs... those failures being, mainly, that fpdoc and/or fpmake did not exist... but my last try was at 0500 this morning and i simply started fpcup clean with no previous config files or directories and let it run... -- NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Jedi Code Format barfs on an Octal number
On 12/16/2013 2:58 AM, Michael Van Canneyt wrote: On Sun, 15 Dec 2013, waldo kitty wrote: On 12/15/2013 6:18 PM, brian wrote: The bug is a simple one, JCF won't accept the '' syntax for an octal number. There's absolutely no doubt that this was the problem, all of my units formatted correctly except for the one with the two calls to FpChmod in it, and that one formatted correctly when I changed the octal number to its decimal equivalent. FWIW: the octal format of specifying numbers is relatively new and IIRC only available in FPC mode... 'relatively new' is relative. I think octal notation has been available in FPC since many years. yes, but it is not available in TP/BP and (IIRC) Delphi... for many out here in the wilds, that qualifies ;) in any case, yes, it is a relative observation of relativistic properties ;) -- NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted. --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Jedi Code Format barfs on an Octal number
On 12/15/2013 6:18 PM, brian wrote: The bug is a simple one, JCF won't accept the '' syntax for an octal number. There's absolutely no doubt that this was the problem, all of my units formatted correctly except for the one with the two calls to FpChmod in it, and that one formatted correctly when I changed the octal number to its decimal equivalent. FWIW: the octal format of specifying numbers is relatively new and IIRC only available in FPC mode... TP and Delphi mode should not accept them IIRC and it may be that JCF doesn't distinguish what mode the source code is written for... further than that, i'm sitting on the sidelines watching the responses ;) -- NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted. --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] The future of desktop
On 12/4/2013 3:43 PM, Sven Barth wrote: I know it sounds harsh, but: patches are accepted. In Open Source one mostly investigates in problems that oneself is interested in. this reminds me of one of the mantras of (F)OSS... There is no crying in (F)OSS. meaning that if something doesn't work, fix it or find someone to fix it ;) Afterall most developers are working on such projects in their free time. So if you want something implemented then either implement it yourself or find someone else to implement it for you (e.g. by putting up a bounty or by finding some kind soul that would implement it). that's is how it is done and has been for many years :) -- NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted. --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] The future of desktop
On 12/3/2013 3:48 AM, Michael Schnell wrote: (or did you just stumble at the capitals and blanks ? ) yes, exactly and thus why i asked for clarification since they changed the meaning considerably ;) -- NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted. --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] The future of desktop
On 12/2/2013 4:06 AM, Michael Schnell wrote: If your effort allows for compiling pascal to Java Script this might be even do you mean java or javascript above? ;) -- NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How is XMLConfig supposed to work?
On 11/27/2013 6:50 AM, Frederic Da Vitoria wrote: Hello, I am trying to use XmlConfig to store simple configuration data, but I can't make it create a sensible Xml file. This is not really important in my situation, as XmlConfig is able to correctly read back the strange data it wrote, but frustrating. I searched the web but could not find any example. So can anyone offer a working example of creating a xml file with XmlConfig? can you provide a sample of what is being created and what you are expecting to actually see? -- NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] DateDif function needed
On 11/18/2013 11:46 AM, Hans-Peter Diettrich wrote: Jürgen Hestermann schrieb: I still find CalenderDiff the best name for this function because it clearly states that differences are calculated for calender dates and not for an homogeneous stream of seconds/hours/days. This raises immediately the next question: which calendar? :choke: :splutter: :lol: you are right, though... GregorianCalendarDiff then?? but wouldn't that also need corresponding name changes to such routines as DaysIn* and others? or an additional parameter indicating which calendar is to be used? ;) O:) -- NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] DateDif function needed
On 11/16/2013 5:08 AM, John Landmesser wrote: This discussion seems to be finished ( 92 posts ) and i want to make a proposal as solution: Use the function DateDiff from Jedi ( RxLib ) ( JvJCLUtils.pas ). that routine is actually a procedure... the one i posted is a function that returns the sought values ;) It's not perfect, but it works for me: ** procedure DateDiff(Date1, Date2: TDateTime; var Days, Months, Years: word); you have to feed this one with 5 variables... the one i posted you feed only 3 variables and you get back a three field record... i've been working on also adding 3 more fields for hour, minutes and seconds ;) plus, the name should be more in line with the actual process... CalendarDateDiff or CalendarDiff... just my two cents, for what they're worth... -- NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] DateDif function needed
On 11/16/2013 5:08 AM, John Landmesser wrote: This discussion seems to be finished ( 92 posts ) and i want to make a proposal as solution: Use the function DateDiff from Jedi ( RxLib ) ( JvJCLUtils.pas ). It's not perfect, but it works for me: in what way do you think it is not perfect for your purposes or needs? FWIW: i copied the jedi datediff you posted and placed it in my testing project to compare my output with it... the results are exactly the same... but i still wonder if the last day of a month to the last day of another month should be counted as a full month... eg: CalendarDateDiff: 2012-01-31 to 2012-02-29 =0 yrs0 mos 29 days JediDateDiff: 2012-01-31 to 2012-02-29 =0 yrs0 mos 29 days should this actually be 2012-01-31 to 2012-02-29 =0 yrs1 mos 0 days -- NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] DateDif function needed
On 11/16/2013 10:09 AM, waldo kitty wrote: On 11/16/2013 5:08 AM, John Landmesser wrote: This discussion seems to be finished ( 92 posts ) and i want to make a proposal as solution: Use the function DateDiff from Jedi ( RxLib ) ( JvJCLUtils.pas ). that routine is actually a procedure... the one i posted is a function that returns the sought values ;) It's not perfect, but it works for me: ** procedure DateDiff(Date1, Date2: TDateTime; var Days, Months, Years: word); you have to feed this one with 5 variables... the one i posted you feed only 3 typo! feed only 2 variables and you get back a three field record... i've been working on also adding 3 more fields for hour, minutes and seconds ;) -- NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] DateDif function needed
On 11/16/2013 11:07 AM, waldo kitty wrote: [...] but i still wonder if the last day of a month to the last day of another month should be counted as a full month... eg: CalendarDateDiff: 2012-01-31 to 2012-02-29 =0 yrs0 mos 29 days JediDateDiff: 2012-01-31 to 2012-02-29 =0 yrs0 mos 29 days should this actually be 2012-01-31 to 2012-02-29 =0 yrs1 mos 0 days to this end, i now have my routine doing this... note *'s below... CalendarDateDiff: 2012-01-31 to 2012-01-31 =0 yrs0 mos0 days JediDateDiff: 2012-01-31 to 2012-01-31 =0 yrs0 mos0 days CalendarDateDiff: 2012-01-31 to 2012-02-29 =0 yrs1 mos0 days* JediDateDiff: 2012-01-31 to 2012-02-29 =0 yrs0 mos 29 days CalendarDateDiff: 2012-01-31 to 2012-03-31 =0 yrs2 mos0 days JediDateDiff: 2012-01-31 to 2012-03-31 =0 yrs2 mos0 days CalendarDateDiff: 2012-01-31 to 2012-04-30 =0 yrs3 mos0 days* JediDateDiff: 2012-01-31 to 2012-04-30 =0 yrs2 mos 30 days CalendarDateDiff: 2012-01-31 to 2012-05-31 =0 yrs4 mos0 days JediDateDiff: 2012-01-31 to 2012-05-31 =0 yrs4 mos0 days CalendarDateDiff: 2012-01-31 to 2012-06-30 =0 yrs5 mos0 days* JediDateDiff: 2012-01-31 to 2012-06-30 =0 yrs4 mos 30 days CalendarDateDiff: 2012-01-31 to 2012-07-31 =0 yrs6 mos0 days JediDateDiff: 2012-01-31 to 2012-07-31 =0 yrs6 mos0 days CalendarDateDiff: 2012-01-31 to 2012-08-31 =0 yrs7 mos0 days JediDateDiff: 2012-01-31 to 2012-08-31 =0 yrs7 mos0 days CalendarDateDiff: 2012-01-31 to 2012-09-30 =0 yrs8 mos0 days* JediDateDiff: 2012-01-31 to 2012-09-30 =0 yrs7 mos 30 days CalendarDateDiff: 2012-01-31 to 2012-10-31 =0 yrs9 mos0 days JediDateDiff: 2012-01-31 to 2012-10-31 =0 yrs9 mos0 days CalendarDateDiff: 2012-01-31 to 2012-11-30 =0 yrs 10 mos0 days* JediDateDiff: 2012-01-31 to 2012-11-30 =0 yrs9 mos 30 days CalendarDateDiff: 2012-01-31 to 2012-12-31 =0 yrs 11 mos0 days JediDateDiff: 2012-01-31 to 2012-12-31 =0 yrs 11 mos0 days -- NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] DateDif function needed
On 11/16/2013 12:27 PM, Reinier Olislagers wrote: On 16/11/2013 18:21, Michael Van Canneyt wrote: On Fri, 15 Nov 2013, Bart wrote: The fun part for me is the fact that a seemingly simple question, where at first glance you would think I'll just implement that, can lead to so many problems. I added a modified version of your implementation to the DateUtils unit as: Procedure PeriodBetween(Const ANow, AThen: TDateTime; Out Years, months, days : Word); I chose this name because it is more in line with the existing XXXBetween functions. I did change the algorithm so it does not do the correction for february of the leap year. It returns now the same results as the Jedi function. (which I didn't take for license reasons) Thanks for providing an implementation. i have not received Michael's post quoted above... was it posted to the list or only in private to a few individuals? -- NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] DateDif function needed
On 11/14/2013 4:41 AM, Reimar Grabowski wrote: On Thu, 14 Nov 2013 07:19:56 +0100 Jürgen Hestermann juergen.hesterm...@gmx.de wrote: Am 2013-11-13 19:42, schrieb Reimar Grabowski: 1 julian year = 365.25 days of 86400 SI seconds each. Of course there are lots of other definitions for year but if FPC uses the julian one the value is exact and no approximation So the difference between 2007-01-01 12:00 and 2008-01-01 12:00 ist *not* one year? It is not one julian year. There is nothing like a year. As i said there are different definitions. If you talk about calendar year it's length changes and is therefor not a good measure of time and not used in science. right but this whole thread was started because someone wanted a calendar based datediff function which returns years, months and days... granted, they could have used SI units of 86400 sec/day and 365.25 day's per year (30.4375 days/month) to calculate the difference between their ending date and the current date in a continuous calculation but then looking at the calendar and counting the ones they could see would be different... start: 14 Nov 2013 end: 01 Aug 2018 days: 1721 1721 / 365.25 = 4.7118412047 years = 4 years 0.7118412047 * 365.25 = 260 days 260 / 30.4375 = 8.5420944559 months = 8 months 0.5420944559 = 30.4375 = 16.5 days (trunc) 4 years, 8 months, 16 days OR (round) 4 years, 8 months, 17 days FWIW: the routine we've been working on (with bug fix modifications) returns the same output as the above (from openoffice calc)... 2013-11-14 to 2018-08-01 is4 yrs8 mos 17 days yay! :lol: It's only 365,00 days and therefore not a full year according to your definition. Correct. And this is not my definition it is the correct definition of a julian year and it is based on SI units. Time is measured in SI seconds. If you cannot express 'your year' as seconds it is not a unit of time. by who's definition of time? ;) O:) But this it totaly wrong. Care to elaborate? Or is it just your gut feeling? Same day same time of one year and the next should always be a one year difference. According to what definition of year? Calendar year is a rather poor unit to measure time differences as it is not constant and cannot be expressed in seconds. actually, it can be but depending on the frame reference used, it is either fractions or the count varies ;) so far we have determined in this thread that there are at least four basic sets of routines... calendar inclusive calendar exclusive fixed inclusive (existing *Span routines) fixed exclusive (existing *Between routines) inclusive: includes the first and last days of the period in the count. used in (eg) rent and age calculations. eg: Mon 01 Jul 2013 - Fri 05 Jul 2013 = 5 day work week Mon 01 Jul 2013 - Sun 07 Jul 2013 = 7 day (1 week) rental exclusive: does not count the last day of the period. used in (eg) financial calculations. eg: Mon 01 Jul 2013 - Mon 08 Jul 2013 = 7 days calendar: the difference between the date in one year and the same date in the next or previous year is 1 year... the same with days in months... the 10th is one month from the 10th of the previous month and one month from the 10th in the next month no matter how many days there are in the months involved... fixed: SI oriented counting of the length of years, months and days using specific values for each... The average length of a year in days is: 346.62: a draconitic year 353, 354, 355 : common years in some lunisolar calendars 354.37: average length of a year in lunar calendars 365 : a vague year and a common year in many solar calendars 365.24219 : mean tropical year (rounded to 5 places) for epoch 2000 365.2424 : vernal equinox year (rounded to 4 places) for epoch 2000 365.2425 : average length of a year in the Gregorian calendar 365.25: the average length of a year in the Julian calendar 365.25636 : mean solar year 365.2564 : a sidereal year 365.25689 : a Gaussian year 366 : a leap year in many solar calendars 383, 384 385 : leap years in some lunisolar calendars. 383.9 : leap year in some lunisolar calendars. Astronomical years count the Julian year as a unit of time, defined as 365.25 days of 86400 SI seconds each with no leap seconds. A calendar year is an approximation of the Earth's orbital period in a given calendar. Gregorian calendar years (as well as in the Julian calendar) has either 365 (common years) or 366 (leap years) days. An average Gregorian year is 365.2425 days = 52.1775 weeks = 8765.82 hours = 525949.2 minutes = 31556952 seconds (mean solar, not SI). A common year is 365 days = 8760 hours = 525600 minutes = 31536000 seconds. A leap year is 366 days = 8784 hours = 527040 minutes = 31622400 seconds. The 400-year cycle of the Gregorian calendar has 146097 days and hence exactly 20871 weeks.
Re: [Lazarus] DateDif function needed
On 11/14/2013 4:50 AM, Reimar Grabowski wrote: On Wed, 13 Nov 2013 20:34:36 +0100 John Landmesser joh...@online.de wrote: What about Databases like mysql, Oracle, Firebird. I'm shure they have such a function. For MySQL: DATEDIFF(expr1,expr2) DATEDIFF() returns expr1 – expr2 expressed as a value in days from one date to the other. expr1 and expr2 are date or date-and-time expressions. Only the date parts of the values are used in the calculation. same thing as openOffice Calc... then, as i mention in my other post in this thread, one has to figure out how to count the years and months which will use either estimations (decimal fractions) or variants (actual numbers of days per month and year)... the big decision is which one to use for whatever accuracy is desired O:) -- NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] DateDif function needed
On 11/14/2013 7:25 AM, José Mejuto wrote: Maybe I'm completly wrong ? you are completely right, IMHO... one simply needs to choose their desired base and level of error that is acceptable for their task's needs... the initial problem arose because there's no easy way to calc the desired output with the existing routines and a lot of dancing about... spreadsheets and other languages are in the same boat, too, with the routines they offer... eg: openOffice Calc - no easy way to retain only the fraction of a result so one must dance with subtracting and truncating all the while recalculating the values over and over again... one can elect to use some scratchpad area on the sheet to store some intermittent values... witness: these formulas from Calc using fractional estimations like existing routines in FPc/Lazarus [without scratchpad] total days: =DAYS(A2;B2) whole years: =INT(C2/365.25) [C2 holds total days value] whole months: =INTC2/365.25)-TRUNC(C2/365.25))*365.25)/30.4375) whole days: =ROUND((C2/365.25)-TRUNC(C2/365.25))*365.25)/30.4375)-TRUNC(C2/365.25)-TRUNC(C2/365.25))*365.25)/30.4375)))*30.4375) [with scratchpad] end date: 08/01/2018 [MM/DD/ in A2] start date: 11/14/2013 [MM/DD/ in B2] days between: =DAYS(A2;B2)[in C2] 1721 real years: =C2/365.25 [in AD2] 4.7118412047 int years:=INT(AD2) [in D3] 4 real months: =((AD2-TRUNC(AD2))*365.25)/30.4375 [in AE2] 8.5420944559 int months: =INT(AE2) [in E2] 8 real days:=((AE2)-TRUNC(AE2))*30.4375[in AF2] 16.5 int days: =ROUND(AF2) [in F2] 17 -- NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] DateDif function needed
On 11/14/2013 8:16 AM, Mattias Gaertner wrote: On Thu, 14 Nov 2013 13:48:46 +0100 John Landmesser joh...@online.de wrote: [...] Our function delivers the age of a person in years, months, days. What is your diff between 31th Jan and 30 March 2013? the one i am currently testing returns 2013-01-31 to 2013-03-30 is0 yrs1 mos 30 days FWTW, too ;) leapyear: 2012-01-31 to 2012-03-30 is0 yrs1 mos 30 days non-leapyear to leapyear: 2011-01-31 to 2012-03-30 is1 yrs1 mos 30 days leapyear to non-leapyear: 2012-01-31 to 2013-03-30 is1 yrs1 mos 30 days non-leapyear thru leapyear to non-leapyear: 2011-01-31 to 2013-03-30 is2 yrs1 mos 30 days leapyear thru non-leapyear to non-leapyear: 2012-01-31 to 2014-03-30 is2 yrs1 mos 30 days the whole of Feb is counted as a month no matter how many days it has... -- NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] DateDif function needed
On 11/14/2013 12:26 PM, Bart wrote: On 11/14/13, waldo kitty wkitt...@windstream.net wrote: you are completely right, IMHO... one simply needs to choose their desired base and level of error that is acceptable for their task's needs... It's all about definition. right... that's what i meant by desired base... eg: calendar, SI notation, Julian, Gregorian, etc...) For me I would think that given today is the last day of a given month, then today + 1 month = the same date on in the next month, agreed... or if the next month has fewer day, the last day of the next month. yeah... i'm undecided on that :? (** below) my current code returns the following... 2012-01-29 to 2012-02-29 is 0 yrs 1 mos 0 days 2012-01-29 to 2012-03-01 is 0 yrs 1 mos 3 days 2012-01-29 to 2012-03-31 is 0 yrs 2 mos 2 days 2012-01-29 to 2012-04-30 is 0 yrs 3 mos 1 days 2012-01-29 to 2012-05-31 is 0 yrs 4 mos 2 days 2012-01-29 to 2012-06-30 is 0 yrs 5 mos 1 days 2012-01-29 to 2012-07-31 is 0 yrs 6 mos 2 days 2012-01-29 to 2012-08-31 is 0 yrs 7 mos 2 days 2012-01-29 to 2012-09-30 is 0 yrs 8 mos 1 days 2012-01-29 to 2012-10-31 is 0 yrs 9 mos 2 days 2012-01-29 to 2012-11-30 is 0 yrs 10 mos 1 days 2012-01-29 to 2012-12-31 is 0 yrs 11 mos 2 days 2012-01-31 to 2012-02-29 is 0 yrs 0 mos 29 days** 2012-01-31 to 2012-03-01 is 0 yrs 1 mos 1 days 2012-01-31 to 2012-03-31 is 0 yrs 2 mos 0 days 2012-01-31 to 2012-04-30 is 0 yrs 2 mos 30 days** 2012-01-31 to 2012-05-31 is 0 yrs 4 mos 0 days 2012-01-31 to 2012-06-30 is 0 yrs 4 mos 30 days** 2012-01-31 to 2012-07-31 is 0 yrs 6 mos 0 days 2012-01-31 to 2012-08-31 is 0 yrs 7 mos 0 days 2012-01-31 to 2012-09-30 is 0 yrs 7 mos 30 days** 2012-01-31 to 2012-10-31 is 0 yrs 9 mos 0 days 2012-01-31 to 2012-11-30 is 0 yrs 9 mos 30 days** 2012-01-31 to 2012-12-31 is 0 yrs 11 mos 0 days So - april 30th + 1 month = may 30th - march 31st + 1 month = may 30th (not june 1st) Yet all of our tools (includimg mine) say march 31st to april 30th = 0 months + 30 days... i know what you mean ;) :) -- NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] DateDif function needed
On 11/14/2013 12:48 PM, Jürgen Hestermann wrote: Am 2013-11-14 07:56, schrieb Patrick Chevalley: So the difference between 2007-01-01 12:00 and 2008-01-01 12:00 ist *not* one year? No, the base definition of the year is not a digit change, but the time it take to the Earth to return at the same point of its orbit around the Sun. Well, *this* value (earth at the same point) is also varying. exactly! the earth does not travel in a perfect circle around the sun with the sun in a fixed central position... then there's the tilt of the earth and that the poles wobble around following the 25770 year equinox precession such that Deneb will be the north pole star instead of Polaris at some point in the future (AD1) :) When doing astronomical calculations I would definitely not use a fixed value. but many do use fixed fractional average numbers to make the math easier and they live with the small errors... witness my long posting earlier today with the charts of days per year values and the numerous year periods ;) The julian year of 365.25 is a convenient approximation still in use despite the julian calendar was abrogated some 400 years ago. Of what use would it be to use 365.25 days as a representation of a year? You can also use 400 instead. It would be just an arbitrary definition decoupled from calendars. You cannot calculate anything useful with it. Neither calendar dates nor astronomical things. It is just an accademic value and exists only because it is so easy to use. i can agree with this ;) All this efforts are to bypass the problem with the calendar year (the one you mention) because it is sometime 365 and sometime 366 days. This is a totally unacceptable definition when you need an homogeneous time scale. Well, that's just the whole point of this thread: The time scale we are talking about here is *not* homogeneous! Instead, a synchronization with calendar dates is wanted/needed. That has always been a problem with calendar definitons. The rotation of earth around the sun is not a whole-numbered multiple of its rotation around itself but we want a whole number of days (otherwise day time would no longer be related to sunlight). So we synchronize our calendar with the run of the sun by leap days (and leap seconds). But now years and months are no longer a fixed value. Therefore differences must be calculated in a more complex way based on dates and not as a fixed number of (milli)seconds. It's easy to use fixed values for day, month, year but it is of no use when talking about calendars. i couldn't have said it better :) So all depend of the use you need for your application and it must be admitted that one set of definition/function is not sufficient and every one must be careful when using time period. Just give me an example where a fixed value for a month is of use? If you rent an appartement you will definitely not be able to insist on your fixed definition of a month (i.e., when starting on february the 1st). In daily usage the time ranges vary depending on the month you look at. one can see this in recurring billings... some are 30 billing periods whereas others are monthly based where the bill is due on the same day of each month... in the former case, the due date floats about in each successive month... the latter is always on the X day of the month... i much prefer monthly billing over 30 day billing ;) For me the very simple functions as implemented if FPC are sufficient, In what context do you use these functions? -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] DateDif function needed
On 11/13/2013 3:53 AM, Lukasz Sokol wrote: [snip] All this, should be planned to use 64 bit Unix Timestamps already ;) (year 2038 is not that long away) agreed but that is dependent on what TDateTime does since it is built on that like other existing time and date routines ;) at one point i was using int64 instead of word but i got tired of having to continually convert because of existing routines using word... and yeah, i do know that they can roll over and cause problems there... -- NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] DateDif function needed
On 11/13/2013 5:19 AM, John Landmesser wrote: On 13.11.2013 02:33, waldo kitty wrote: actually, i have in some cases... let's ask this question and see what your charts and routines return as the result... assuming your format is DD.MM.... Date1 := 01.01.2000 Date2 := 01.01.2000 should be 0 (zero), right? then Date1 := 01.01.2000 Date2 := 02.01.2000 should be 1 (one), right? in this case, what i (and bart, too) wrote, we're not counting the starting day but we are counting the ending day... this rule stays in effect throughout the entire process... my head still aches from rummaging about doing this... it was good exercise and one i remember being given on a test many years back to determine one's coding level... at that time, the code was being done in dBase II/III/IV ;) i will have to dig deeper and see what is crossing things up for count from 29.02.2000 to 28.02.2001... i see bart has posted a fix which i have not yet had a chance to compare with my code or run thru the tests i included in my posting... the real question is this: what do we count? the starting day, the ending day, both days or neither day? then we have another question: is dayM in monthY a one month difference to dayM in monthX and monthZ? monthX, monthY, monthZ are any three consecutive months in linear order within one year or crossing two years once the rules are chosen, then we have something to work with... I'm just a hobbyist, never went to university to study computer science. i never went to school for any of my computer skills, either... i'm self taught in both hardware and software ;) We don't need to invent the wheel again, because others have solutions for that! then why does this thread exist? O:) Perhaps its solved in The Art of/Computer Programming/ from Donald E. Knuth? I don't have such books and i don't know if i'd have the chance to understand such a book?!! i don't know as i do not have that book... but since you have the three routines available, can you please post what they return for the two cases above?? [...] Bart delivered code that calculates 29.02.2000 to 28.02.2001 = 1 Year. And that looks reasonable to me! but it is not, not really... 29.02 only comes around once every four years... 29.02.leapyear to 28.02.leapyear+1 is one day short of a year... if you were born on 29.02.1960, have you celebrated your birthday 13 or 53 times? :) Bart wrote: I would actually say that in this particular case the diff is 1 Year... (11 M + (28 days in feb in a non-leapyear = 1M) = 12M = 1 Y. Soon we'll have working DateDiff function and my question will be answered in the end! Thanks guys!! i can, however, agree with the reasoning bart has given above... do you agree with it? is that what you want to see? which of the following is what you want to see?? 2000-02-29 to 2001-02-28 is0 yrs 11 mos 27 days (original) 2000-02-29 to 2001-02-28 is0 yrs 11 mos 28 days (bart's fix) 2000-02-29 to 2001-02-28 is1 yrs0 mos0 days (actually desired?) -- NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] DateDif function needed
NOTE: subject fixed to indicate the actual topic ;) On 11/13/2013 6:24 AM, Lex Edmonds wrote: This is my first post on this mailing list, so please bear with me. I used to do date calculations like this in the '80s when I was writing Real Estate software. On Tue, 12 Nov 2013 20:33:00, waldo kitty wrote: [...] the real question is this: what do we count? the starting day, the ending day, both days or neither day? There are two types of days-between-dates calculations: Inclusive and Exclusive. Generally, the starting day should be considered the first day of the calculation. With an Inclusive calculation, the ending day is counted. With an Exclusive calculation, the ending day is not counted -- it is considered to be the first day of the following period. agreed and as you note later, two different types of the base... either true interval or calendar interval... In Real Estate for example, date calculations are Inclusive. So a 1-week rent payment that starts on Monday 1 January 2007 ends on Sunday 7 January 2007. Therefore an Inclusive DateDiff calculation between 1/01/2007 and 7/01/2007 would return 7 days. Whereas an Exclusive calculation would return 6 days. agreed... Similarly, when calculating a person's age. A baby born on 1/01/2007 would be 7 days old on 7/01/2007. true :) then we have another question: is dayM in monthY a one month difference to dayM in monthX and monthZ? monthX, monthY, monthZ are any three consecutive months in linear order within one year or crossing two years once the rules are chosen, then we have something to work with... This is a topic that has some tricky boundary conditions. the boundaries are what we are trying to determine ;) Generally the rule is easy for days 1-27 in every month: The Inclusive DateDiff between day M in month 1 and Day M-1 in month 2 returns 1 month. e.g. between 28/01/2007 and 27/02/2007. yes... However the rules get muddy with days 28-31. i.e. the last few days of every month. yes... in calendar counting, a full month is recorded when DoM1 = EoM2 For example, an Inclusive DateDiff calculation between 29/01/2007 and 28/02/2007 should return 1 month. In my opinion, an Inclusive calculation between 30/01/2007 and 28/02/2007 should also return 1 month. And so should an Inclusive calculation between 31/01/2007 and 28/02/2007. openOffice 4 seems to agree with you when using calendar counting ;) the first 12 are leapyear and the last six are non-leapyear... Start End DaysMonths Months (interval) (calendar) 2000-01-27 2000-02-28 32 11 2000-01-28 2000-02-28 31 11 2000-01-29 2000-02-28 30 01 2000-01-30 2000-02-28 29 01 2000-01-31 2000-02-28 28 01 2000-02-01 2000-02-28 27 00 2000-01-27 2000-02-29 33 11 2000-01-28 2000-02-29 32 11 2000-01-29 2000-02-29 31 11 2000-01-30 2000-02-29 30 01 2000-01-31 2000-02-29 29 01 2000-02-01 2000-02-29 28 00 2001-01-27 2001-02-28 32 11 2001-01-28 2001-02-28 31 11 2001-01-29 2001-02-28 30 01 2001-01-30 2001-02-28 29 01 2001-01-31 2001-02-28 28 01 2001-02-01 2001-02-28 27 00 In fact, we used to call these calendar months to differentiate them from other months that might always be defined as having perhaps 30 days. So as you see, there is no real hard answer to your question. It probably depend on what you are trying to achieve. i think that the existing routines are two variations on interval (inclusive and exclusive) and this discussion is about getting calendar routines in place... so far we seem to have something close to a working CalendarDateDiff(D1,D2: TDateTime) :) -- NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] DateDif function needed
On 11/13/2013 9:37 AM, John Landmesser wrote: On 13.11.2013 14:02, waldo kitty wrote: We don't need to invent the wheel again, because others have solutions for that! then why does this thread exist? O:) I'll try to find what the usual way is to handle these problems: c++ Libraries for example?! i was being facetious thus the smiley ;) i don't know as i do not have that book... but since you have the three routines available, can you please post what they return for the two cases above?? I don't have my test app anymore, changed it a lot last days to follow the discussion, but perhaps you have a look at my post from 12.11.2013, 21:56 i know that feeling... i've taken to trying to save each in its own project so that i still have them to go back to to look over ;) [...] Bart delivered code that calculates 29.02.2000 to 28.02.2001 = 1 Year. And that looks reasonable to me! but it is not, not really... 29.02 only comes around once every four years... 29.02.leapyear to 28.02.leapyear+1 is one day short of a year... if you were born on 29.02.1960, have you celebrated your birthday 13 or 53 times? :) That depends on the country , you're living, see http://en.wikipedia.org/wiki/February_29#Births yeah, i've heard that, too... however, my experience shows that it is personal preference in many cases... i have several friends born on 29 Feb and some of them count every full year as their age but only celebrate on leapyears while others only count the leapyears... then there's the one oddball who celebrates every year but only counts the leapyears :lol: Bart wrote: I would actually say that in this particular case the diff is 1 Year... (11 M + (28 days in feb in a non-leapyear = 1M) = 12M = 1 Y. Soon we'll have working DateDiff function and my question will be answered in the end! Thanks guys!! i can, however, agree with the reasoning bart has given above... do you agree with it? is that what you want to see? I'm not the one to decide, but i need a function which provides widely accepted results! as lex edmonds spoke of, there are two types of calculations... inclusive and exclusive where the ending day is counted or not... then there is also whether we are looking to use (strict) intervals or calendar intervals... if i have been keeping up, you are looking for calendar intervals (based on your post where 01.01.2000 to 01.08.2001 should be 1 year, 7 months)... as far as not one to decide... on the contrary... you are the one to decide if a routine fits your purposes... as far as accepting a routine to be added to one of the libraries distributed with FPC and/or Lazarus, yeah, that's up to someone on those teams... I'll google again. which of the following is what you want to see?? 2000-02-29 to 2001-02-28 is0 yrs 11 mos 27 days (original) 2000-02-29 to 2001-02-28 is0 yrs 11 mos 28 days (bart's fix) 2000-02-29 to 2001-02-28 is1 yrs0 mos0 days (actually desired?) so which one of these are you actually looking for? ;) -- NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] DateDif function needed
On 11/13/2013 1:42 PM, Reimar Grabowski wrote: On Tue, 12 Nov 2013 22:00:39 +0100 (CET) Michael Van Canneyt mich...@freepascal.org wrote: Seeing this, I can't help but think that the approximation approach may not be such a bad idea after all :D Can you elaborate what the approximation is? I fail to see it. 1 julian year = 365.25 days of 86400 SI seconds each. from dateutil.inc (line ~64)... Const { Average over a 4 year span. Valid for next 100 years } ApproxDaysPerMonth: Double = 30.4375; ApproxDaysPerYear: Double = 365.25; Of course there are lots of other definitions for year but if FPC uses the julian one the value is exact and no approximation. And it is one of the year definitions that make sense as a unit of time (in contrast to calendar year ...) the problem is that knowing the (eg) YearsBetween or YearsSpan does not easily lend itself to being able to determine the remainder Months, Days, Hours, Minutes, Seconds... the same with MonthsBetween or MonthSpan... Days is known and can be used for the other finer values but you also cannot use it to build a months or years value that works out properly with the other values... -- NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] DateDif function needed
On 11/13/2013 5:14 PM, Bart wrote: On 11/13/13, John Landmesser joh...@online.de wrote: I'm just a hobbyist, never went to university to study computer science. So am I. (For my background, see my userpage on the wiki) i probably should set something, too... while i have an account on the wiki and have done a little bit of editing, i haven't set much of any background type of information... We don't need to invent the wheel again, because others have solutions for that! Of course we don't have to. I just gor intrigued by the (at that time already) long thread, and since no-one gave a solution, I just went for it and gave it my try. Just because it is fun to do. a brother from a different mother! howdy, brother! :) O:) i'm still working on it, too :lol: i had thought i found a spreadsheet that would give the answers so as to compare with my output... the first thing i had to do, though, was set a max(a1,a2) and min(a1,a2) so that the lower date was placed first and the higher second as our code does but while i got the same answers for numerous tests, some returned a negative number in the sheet :( so besides that, i've been trying to work my way, manually, through and count on a calendar... so far, everything seems to come out but not with the original code you and i posted and not with your fix... i had to go a bit deeper for the corners... anyway, i'm still whacking away at it and hope to maybe get something completed for the community... but it is slow and the columns of numbers just meld together at time when manually counting from the almanac %) -- NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] DateDif function needed
On 11/11/2013 6:54 PM, waldo kitty wrote: On 11/11/2013 10:46 AM, John Landmesser wrote: Fazit: You can't write a DateDif function with the functions in DateUtils.pas ?!! actually, you can but it is more brute-force for the results that you and i are looking for... brute-force as in actually looping thru each unit and incrementing a counter for that part to fill a record of some sort which is then used to show the desired counts... i'm working on one as we speak ;) it is amazing what refinements and streamlining will come up with at times... originally this was totally brute force... then i started refining and cleaning it up until i came up with this... it also includes a set of a set of dates for testing... = snip = program DateDiff3; uses SysUtils,DateUtils,StrUtils; type Date_Diff = record Years, Months, Days: Word; end; function CalendarDateDiff(Date1,Date2: TDateTime): Date_Diff; var theDiffRec: Date_Diff; Cmp: Integer; loDate,hiDate: TDateTime; loYear,hiYear,loMonth,hiMonth,loDay,hiDay: Word; begin FillChar(theDiffRec,SizeOf(theDiffRec),0); // init results to zero Cmp:=CompareDateTime(Date1,Date2); // compare dates If Cmp0 then begin loDate:= Date1; // and set loDate to oldest hiDate:= Date2; end else if Cmp0 then begin loDate:= Date2; // and set loDate to oldest hiDate:= Date1; end; DecodeDate(loDate,loYear,loMonth,loDay); DecodeDate(hiDate,hiYear,hiMonth,hiDay); theDiffRec.Years:= hiYear - loYear; if (loMonth hiMonth) or ((loMonth = hiMonth) and (loDay hiDay)) then begin theDiffRec.Years:= theDiffRec.Years - 1; end; if loMonth hiMonth then begin hiMonth:= hiMonth + 12; end; theDiffRec.Months:= hiMonth - loMonth; if hiDay = loDay then begin theDiffRec.Days:= hiDay - loDay end else begin if theDiffRec.Months = 0 then begin theDiffRec.Months:= 11; end else begin theDiffRec.Months:= theDiffRec.Months - 1; end; theDiffRec.Days:= DaysInAMonth(hiYear,loMonth) - loDay + hiDay; end; Result:= theDiffRec; end; procedure Test(D1,D2: TDateTime); var DateDiffRec: Date_Diff; begin FillChar(DateDiffRec,SizeOf(DateDiffRec),0); DateDiffRec:= CalendarDateDiff(D1,D2); writeln(PadLeft(IntToStr(DateDiffRec.Years),4)+' yrs '+PadLeft(IntToStr(DateDiffRec.Months),4)+' mos '+PadLeft(IntToStr(DateDiffRec.Days),4)+' days'); end; type DateRecord = record Year, Month, Day: Word; end; const TstDates1: array[1..26] of DateRecord = ( (Year:2000;Month:01;Day:01), (Year:2000;Month:01;Day:02), (Year:2000;Month:01;Day:31), (Year:2000;Month:02;Day:01), (Year:2000;Month:02;Day:28), (Year:2000;Month:02;Day:29), (Year:2000;Month:03;Day:01), (Year:2000;Month:03;Day:15), (Year:2000;Month:12;Day:31), (Year:2001;Month:01;Day:01), (Year:2001;Month:01;Day:02), (Year:2001;Month:02;Day:01), (Year:2001;Month:02;Day:28), (Year:2001;Month:02;Day:29), (Year:2001;Month:03;Day:01), (Year:2001;Month:03;Day:15), (Year:2001;Month:08;Day:01), (Year:2001;Month:12;Day:31), (Year:2004;Month:01;Day:01), (Year:2004;Month:01;Day:02), (Year:2004;Month:02;Day:01), (Year:2004;Month:02;Day:28), (Year:2004;Month:02;Day:29), (Year:2004;Month:03;Day:01), (Year:2004;Month:03;Day:15), (Year:2004;Month:12;Day:31) ); TstDates2: Array[1..26] of DateRecord = ( (Year:2000;Month:01;Day:01), (Year:2000;Month:01;Day:02), (Year:2000;Month:01;Day:31), (Year:2000;Month:02;Day:01
Re: [Lazarus] DateDif function needed
*FWIW* On 11/11/2013 5:11 PM, Bart wrote: type TDaysPerMonth = Array[1..12] of Word; function DaysPerMonth(AMonth: Word; IsLeapYear: Boolean): Word; const DaysPerMonthNormal: TDaysPerMonth = (31,28,31,30,31,30,31,31,30,31,30,31); DaysPerMonthLeap: TDaysPerMonth = (31,29,31,30,31,30,31,31,30,31,30,31); begin if IsLeapYear then Result := DaysPerMonthLeap[AMonth] else Result := DaysPerMonthNormal[AMonth]; end; you do not need any of the above if you change Days := (DaysPerMonth(M1, IsLeapYear(Y2)) - D1) + D2 ; to Days := (DaysInAMonth(Y2,M1) - D1) + D2; this because DaysInAMonth returns the correct number of days and takes leapyear into account automatically... so there's no reason to duplicate existing code with the above type and function ;) outside of this, what you came up with is almost exactly what i worked my way down to as i was working on my own solution... it took me a while and then when i saw your post, i was astonished at how the mind works at times :LOL: -- NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] DateDif function needed
On 11/12/2013 3:40 PM, John Landmesser wrote: On 12.11.2013 21:01, waldo kitty wrote: [...] Which is correct? Date1 := 29.2.2000 Date2 := 28.02.2001 Your function: 0 Y, 11 M, 27 D Rxlib ( Jedi ) DateDiff: 0 Y, 11 M, 28 D Libre Office Calc: 0 Y, 11 M, 30 D The table - function of Libre Office Calc is called in german DATUMDIF() Get a calendar and count?? actually, i have in some cases... let's ask this question and see what your charts and routines return as the result... assuming your format is DD.MM.... Date1 := 01.01.2000 Date2 := 01.01.2000 should be 0 (zero), right? then Date1 := 01.01.2000 Date2 := 02.01.2000 should be 1 (one), right? in this case, what i (and bart, too) wrote, we're not counting the starting day but we are counting the ending day... this rule stays in effect throughout the entire process... my head still aches from rummaging about doing this... it was good exercise and one i remember being given on a test many years back to determine one's coding level... at that time, the code was being done in dBase II/III/IV ;) i will have to dig deeper and see what is crossing things up for count from 29.02.2000 to 28.02.2001... i see bart has posted a fix which i have not yet had a chance to compare with my code or run thru the tests i included in my posting... the real question is this: what do we count? the starting day, the ending day, both days or neither day? then we have another question: is dayM in monthY a one month difference to dayM in monthX and monthZ? monthX, monthY, monthZ are any three consecutive months in linear order within one year or crossing two years once the rules are chosen, then we have something to work with... -- NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] DateDif function needed
On 11/11/2013 3:39 AM, Michael Schnell wrote: On 11/08/2013 09:35 PM, John Landmesser wrote: Result would be: 0 years, 0 moths, 11 days IMHO a date diff in this format us desperately misleading, as the count of days in a month varies. understood but it is what many of us want for tasks of this nature... it means that one need know the numbers of days in the months between the dates so they can be properly counted... it also means knowing if a leap year is involved at some point... the *Span routines may be able to give us this info since they have fractional parts but as the code notes, starting with years or months values will result in an estimation... -- NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] DateDif function needed
On 11/11/2013 10:46 AM, John Landmesser wrote: Fazit: You can't write a DateDif function with the functions in DateUtils.pas ?!! actually, you can but it is more brute-force for the results that you and i are looking for... brute-force as in actually looping thru each unit and incrementing a counter for that part to fill a record of some sort which is then used to show the desired counts... i'm working on one as we speak ;) -- NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] chmhelp exit heaptrace error
Lazarus 1.3 r42488 FPC 2.7.1 r26006 i386-win32-win32/win64 see attached png as i could not c'n'p from it as hoped... this is the first popup on exiting chmhelp after opening it and simply exiting... opening chmhelp was done from laz via F1 with the cursor on Classes in the default project... -- NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted. attachment: chmhelp_close_err1.png-- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus