[Lazarus] StringGrid.loadFromCSVFile question
Hi, A few months ago I made an application that uses StringGrid.LoadFromCSVFile. This worked. Now, on a PC with a newer linux-OS, and a newer Lazarus/FPC, I try to work further on that application but now the application from the original sources crashes. It seems it can no longer automatically append lines to a stringgrid. Error : index out of range Cell[Col=0, Row=x]. When I manually append lines (= in the IDE) the application can load some more lines, but crashes when the grid-lines are all used. I found in the stringgrid.options goAutoAddRows and set this to true. No help. I set goAutoAddRowsSkipContentCheck to true, no help. Am I missing something ? I made lazarus with fpc-up. Lazarus about says : fpc-version 2.6.5, svn revision 48926. Any help ? Koenraad. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Detecting X minutes ago.
Hi, Here is a simple way : T:=Now()- StrToTime('00:05:00'); or more profesional way : //add dateutils to uses T:=IncMinute(Now(),-5); Regards, Ara -- http://www.fastmail.com - The professional email service -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Detecting X minutes ago.
Hi All, What's the best way of detecting what Now - 5 minutes is? Effectively, I want to do the following: 5MinsAgo: TDateTime; 5MinsAgo := Now -5 minutes? Thanks in advance Richard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] StringGrid.loadFromCSVFile question
On 6/1/15, Koenraad Lelong lazar...@de-brouwerij.be wrote: A few months ago I made an application that uses StringGrid.LoadFromCSVFile. This worked. Now, on a PC with a newer linux-OS, and a newer Lazarus/FPC, I try to work further on that application but now the application from the original sources crashes. It seems it can no longer automatically append lines to a stringgrid. Error : index out of range Cell[Col=0, Row=x]. When I manually append lines (= in the IDE) the application can load some more lines, but crashes when the grid-lines are all used. Please attach a sample program and sample .csv to demonstrate the problem. Keep it as simple as possibe (1 grid, 1 button should suffice). Bart -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Detecting X minutes ago.
On Mon, 1 Jun 2015, Richard Mace wrote: Hi All, What's the best way of detecting what Now - 5 minutes is? Effectively, I want to do the following: 5MinsAgo: TDateTime; 5MinsAgo := Now -5 minutes? Uses DateUtils; Var N : TDateTime; begin N:=Now; N:=IncMinutes(N,-5); end; Or somesuch. Michael. -- ___ 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 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?!! Thanks for your advises! -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Base64 broken in json?
El 30/05/15 a las 13:29, silvioprog escibió: On Sat, May 30, 2015 at 12:14 PM, Leonardo M. Ramé l.r...@griensu.com mailto:l.r...@griensu.com wrote: [Window Title] project1 [Content] { var1 : bGVvbmFyZG8= } - leonardo [OK] But after take a look at your code, it seems better to use as: myString := '{ var1: ' + StringToJsonString(Base64EncodedString) + ' }' Because function StringToJsonString will encode string in a JSON-escape string. Hi Silvio, can you try encoding the attached file, then output using both methods?. Leonardo plantilla-original.ott Description: application/vnd.oasis.opendocument.text-template -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Detecting X minutes ago.
Or Now - 5 / MinutesPerDay On June 1, 2015 4:08:06 PM GMT+02:00, aradeonas aradeo...@operamail.com wrote: Hi, Here is a simple way : T:=Now()- StrToTime('00:05:00'); or more profesional way : //add dateutils to uses T:=IncMinute(Now(),-5); Regards, Ara -- ___ 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
[Lazarus] Custom Form design time rendering problem
Hi, I am migrating a Delphi system to Lazarus. Each object of the system is represented in a TFrame. The declaration of TSystemObject (base object/frame) is: {$ifdef BASE_SYSTEMOBJECT_ON_OBJECT} TSystemObject = class(TObject) {$else} TSystemObject = class(TFrame) {$endif} public constructor Create(AOwner : {$ifdef BASE_SYSTEMOBJECT_ON_OBJECT}TObject{$else}TComponent{$endif}); {$ifdef BASE_SYSTEMOBJECT_ON_OBJECT}virtual;{$endif} constructor CreateObject(aOwner : {$ifdef BASE_SYSTEMOBJECT_ON_OBJECT}TObject{$else}TComponent{$endif}{; const aSystemData : TSystemData = nil}); virtual; end; The conditional BASE_SYSTEMOBJECT_ON_OBJECT make it act as a frame at design time, and as a TObject at runtime. Then at runtime I create the designed frame by code when required. In Delphi (any version) it works. In Lazarus, I can not see the components at design time (I don't know at runtime because I did not finished the porting and does not compile yet). I registered it with FormEditingHook.RegisterDesignerBaseClass(TSystemObject); The registration went well! I installed the package ok. The properties of the TSystemObject are on the object inspector as expected. When I open a unit with a SystemObject created in Delphi, it opens, but the components inside it (in the frame) are not rendered at design time. I can select them with a mouse clic, and the properties of them are ok in the object inspector, but the component is not visible on the form. Even if I add a TButton, it is not visible. What could be wrong? Using .dfm in place of .lfm could be a problem? Then I changed the base class to TForm (in place of TFrame), and registered it as in the custom form example with RegisterCustomForm(TSystemObject,'SystemObject'); This worked as it appears in the new menu dialog. How to do this with TFrame? Thank you! Horacio Jamilis Buenos Aires, Argentina -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus