Re: [Lazarus] Maintainers: packages without description: please add them

2013-03-03 Thread Reinier Olislagers
On 2-3-2013 21:34, Jesus Reyes wrote: --- El vie 1-mar-13, Reinier Olislagers reinierolislag...@gmail.com escribió: Updated description on LazReport addon packages in r40462 Jesus Reyes A. Thanks, Jesus! (And Martin as well as anybody else whose updates I missed) --

[Lazarus] LongString does not work?

2013-03-03 Thread Xiangrong Fang
Hi All, This does not work: TConfiguration = record DataFolder: string[MaxPathLen]; end Error: string length must be a value from 1 to 255 I already have this on the top of my uinit file: {$mode objfpc}{$H+}{$LONGSTRINGS ON} Working with Lazarus 1.0.6/FPC2.6.0 on Linux 3.5/x86_64 Any

Re: [Lazarus] ForceDirectoriesUTF8

2013-03-03 Thread Mattias Gaertner
On Sun, 3 Mar 2013 08:48:30 +0800 Xiangrong Fang xrf...@gmail.com wrote: I would think that that depends on where you get the value for ForceDirectories(UTF8) from. If this vale is obtained from any widget (OpenDialog, TEdit, etc.) the encoding of the value is in UTF-8. If however you

Re: [Lazarus] ForceDirectoriesUTF8

2013-03-03 Thread Xiangrong Fang
If your program has to work now or with older compilers/libraries you have to use the *UTF8 functions. But the problem is, my program works on both Linux and Windows 7 using ForceDirectories (NOT the UTF8 version), and btw, I am running Chinese Version of Windows 7. Could you please tell me

Re: [Lazarus] ForceDirectoriesUTF8

2013-03-03 Thread Mattias Gaertner
On Sun, 3 Mar 2013 16:42:33 +0800 Xiangrong Fang xrf...@gmail.com wrote: If your program has to work now or with older compilers/libraries you have to use the *UTF8 functions. But the problem is, my program works on both Linux and Windows 7 using ForceDirectories (NOT the UTF8 version),

Re: [Lazarus] LongString does not work?

2013-03-03 Thread Sven Barth
On 03.03.2013 09:35, Xiangrong Fang wrote: Hi All, This does not work: TConfiguration = record DataFolder: string[MaxPathLen]; end Error: string length must be a value from 1 to 255 I already have this on the top of my uinit file: {$mode objfpc}{$H+}{$LONGSTRINGS ON} Working with

Re: [Lazarus] LongString does not work?

2013-03-03 Thread Xiangrong Fang
Ok, My purpose is to write the record into stream, so I cannot use variable length. Now I use an array [0..MaxPathLen] of Char. 2013/3/3 Sven Barth pascaldra...@googlemail.com On 03.03.2013 09:35, Xiangrong Fang wrote: Hi All, This does not work: TConfiguration = record

Re: [Lazarus] LongString does not work?

2013-03-03 Thread Sven Barth
On 03.03.2013 10:57, Xiangrong Fang wrote: Ok, My purpose is to write the record into stream, so I cannot use variable length. Now I use an array [0..MaxPathLen] of Char. If you want to write a complete record to stream (and not write it's elements manually) you should declare your record as

Re: [Lazarus] Did anybody else use retinizer for Macbook Retina on lazarus before?

2013-03-03 Thread Mattias Gaertner
On Sun, 3 Mar 2013 01:31:55 +0100 Johannes W. Dietrich j.w.dietr...@medizinische-kybernetik.de wrote: Hi Mattias, sorry that I did not answer your Post before today, somehow I did not see it. But as I saw in svn you managed to find it out by yourself, thank you for adding retina

Re: [Lazarus] Did anybody else use retinizer for Macbook Retina on lazarus before?

2013-03-03 Thread Michael Ring
What I saw was that it was necessary for me to do a clean install of lazarus (meaning rm -rf /usr/local/share/lazarus in my case). Without the clean install it did not work. Michael Am 03.03.13 12:10, schrieb Mattias Gaertner: On Sun, 3 Mar 2013 01:31:55 +0100 Johannes W. Dietrich

Re: [Lazarus] ForceDirectoriesUTF8

2013-03-03 Thread Jürgen Hestermann
I have had the same problem with all the different string encodings arround: Windows API-function can have ANSI or UTF16 encoding. FPC-RTL file functions are restricted to 255 characters (so only ANSI file names are possible). Linux seems to have UTF8. The LCL is UTF8 and the IDE can have

Re: [Lazarus] LongString does not work?

2013-03-03 Thread Xiangrong Fang
Hi Sven, {$mode objfpc}{$H+} TConfiguration = packed record DataFolder: string; end; does not work, but: TConfiguration = packed record DataFolder: array [0..MaxPathLen] of Char; end; worked. My save procedure is: function SaveParams(var Buffer; Count: Integer; FileName:

Re: [Lazarus] LongString does not work?

2013-03-03 Thread Jürgen Hestermann
Am 2013-03-03 13:49, schrieb Xiangrong Fang: Hi Sven, {$mode objfpc}{$H+} TConfiguration = packed record DataFolder: string; end; does not work, but: A (Ansi)string in {$H+} mode is just a pointer (to the characters of the string). So sizeof(DataFolder)=4 (or 8) in all cases. There

Re: [Lazarus] LongString does not work?

2013-03-03 Thread Sven Barth
On 03.03.2013 13:49, Xiangrong Fang wrote: Hi Sven, {$mode objfpc}{$H+} TConfiguration = packed record DataFolder: string; end; does not work, but: TConfiguration = packed record DataFolder: array [0..MaxPathLen] of Char; end; worked. My save procedure is:

Re: [Lazarus] LongString does not work?

2013-03-03 Thread Xiangrong Fang
A (Ansi)string in {$H+} mode is just a pointer (to the characters of the string). So sizeof(DataFolder)=4 (or 8) in all cases. There is no room for the string unless I guess this is the cause, but then there is no need to specify packed if I just use array of char. --

Re: [Lazarus] LongString does not work?

2013-03-03 Thread Sven Barth
On 03.03.2013 14:26, Xiangrong Fang wrote: A (Ansi)string in {$H+} mode is just a pointer (to the characters of the string). So sizeof(DataFolder)=4 (or 8) in all cases. There is no room for the string unless I guess this is the cause, but then there is no need to specify packed if I just use

Re: [Lazarus] LongString does not work?

2013-03-03 Thread Bart
On 3/3/13, Xiangrong Fang xrf...@gmail.com wrote: TConfiguration = packed record DataFolder: array [0..MaxPathLen] of Char; end; worked. My save procedure is: function SaveParams(var Buffer; Count: Integer; FileName: string): Boolean; var fs: TFileStream; begin Result

Re: [Lazarus] Help with... help!

2013-03-03 Thread Reinier Olislagers
On 2-3-2013 6:20, Reinier Olislagers wrote: Guys, Anybody else interested in getting F1 to show the offline help if context-sensitive help is not appropriate? I've gotten partway there but need some help: http://bugs.freepascal.org/view.php?id=23411 Thanks Mattias for your post on the

Re: [Lazarus] LongString does not work?

2013-03-03 Thread Xiangrong Fang
I was using an INI file, but record make things a lot easier. 2013/3/3 Bart bartjun...@gmail.com On 3/3/13, Xiangrong Fang xrf...@gmail.com wrote: TConfiguration = packed record DataFolder: array [0..MaxPathLen] of Char; end; worked. My save procedure is: function

Re: [Lazarus] LongString does not work?

2013-03-03 Thread leledumbo
I was using an INI file, but record make things a lot easier. If you use TIniFile, you don't have to worry about saving and restoring values. It's much easier than writing your own saving/restoring procedure. -- View this message in context:

[Lazarus] Using the clipboard in linux

2013-03-03 Thread appjaws
How do I save, copy to and paste from the clipboard using a kde environment on linux 64? I am using Lazarus 1.0.6 and fpc 2.6.0. Thanks for any help Paul -- ---This message has been sent using Thunderbird on kubuntu--- -- ___ Lazarus mailing list

Re: [Lazarus] buffer and string

2013-03-03 Thread Flávio Etrusco
On Sun, Mar 3, 2013 at 3:17 AM, Xiangrong Fang xrf...@gmail.com wrote: If a buffer expect the first element, and count is the number of elements to write, then what is the unit size of that element? is it always byte? Yes - count is the number of bytes, not the number of elements. --

Re: [Lazarus] Using the clipboard in linux

2013-03-03 Thread Flávio Etrusco
On Sun, Mar 3, 2013 at 1:20 PM, appjaws laza...@appjaws.plus.com wrote: How do I save, copy to and paste from the clipboard using a kde environment on linux 64? I am using Lazarus 1.0.6 and fpc 2.6.0. Thanks for any help Paul Add unit 'Clipbrd', then Clipboard.AsText := 'something'; For

Re: [Lazarus] Using the clipboard in linux

2013-03-03 Thread appjaws
On 03/03/13 17:04, Flávio Etrusco wrote: On Sun, Mar 3, 2013 at 1:20 PM, appjaws laza...@appjaws.plus.com wrote: How do I save, copy to and paste from the clipboard using a kde environment on linux 64? I am using Lazarus 1.0.6 and fpc 2.6.0. Thanks for any help Paul Add unit 'Clipbrd', then

Re: [Lazarus] Using the clipboard in linux

2013-03-03 Thread Mark Morgan Lloyd
appjaws wrote: On 03/03/13 17:04, Flávio Etrusco wrote: On Sun, Mar 3, 2013 at 1:20 PM, appjaws laza...@appjaws.plus.com wrote: How do I save, copy to and paste from the clipboard using a kde environment on linux 64? I am using Lazarus 1.0.6 and fpc 2.6.0. Thanks for any help Paul Add unit

Re: [Lazarus] LongString does not work?

2013-03-03 Thread Luca Olivetti
Al 03/03/13 14:34, En/na Sven Barth ha escrit: For packed there is the guarantee though that the layout will stay the same. Are you sure? Does the same guarantee apply to bitpacked? Lately I've become lazy, and instead of manually decoding data (bits, bytes, words) read from a device, I'm

Re: [Lazarus] LongString does not work?

2013-03-03 Thread Sven Barth
On 03.03.2013 20:32, Luca Olivetti wrote: Al 03/03/13 14:34, En/na Sven Barth ha escrit: For packed there is the guarantee though that the layout will stay the same. Are you sure? Does the same guarantee apply to bitpacked? Lately I've become lazy, and instead of manually decoding data

Re: [Lazarus] WinINet STDCALL callback crash

2013-03-03 Thread matthew
Ludo, Thank you very much for your most informative posting. I have spent the week trying to implement the msdn examples in pure Pascal and in Pascal-DLL hybrids. Success in non-threaded asynchrosity eludes me though. Your example