[Lazarus] Possible bug passing a TStringList to a function.

2009-01-19 Thread Dave Coventry
Hi, If I pass a TStringList to a function: function TSLFunctn(myTSL: TSltringList):integer; var i: integer; begin Result:=0; for i:=0 to myTSL.Count-1 do //<---fails here begin Result+=strtoint(myTSL.Strings[i]); end; end; The function fails when I try to assign quantify myTSL.Count. Ho

Re: [Lazarus] Passing an array to a function

2009-01-19 Thread Dave Coventry
2009/1/20 Darmawan Sugiarto : > Can you give more information about your function. Sure: function FieldValueAsString(var fsbuffer: TByteBuffer; fitype,marker,fisize: integer): string; begin case fitype of 43,52,108:Result:=inttostr(LEtoN(PLongint(@fsbuffer[marker])^)); 50:Result:=inttostr(LEt

Re: [Lazarus] Passing an array to a function

2009-01-19 Thread Darmawan Sugiarto
Can you give more information about your function. =INTOSOFT ALEXIO CHAOS darmawan_sugia...@yahoo.com Yahoo Messager = --- On Mon, 1/19/09, Dave Coventry wrote: From: Dave Coventry Subject: [Lazarus] Passing

Re: [Lazarus] Few features for Lazarus editor

2009-01-19 Thread Hans-Peter Diettrich
ik schrieb: >>> 1. Multiple spliting (and close the split) the editor to horizontal >>> and vertical views >> Better: multiple edit windows, as Delphi has. > > That can work, the thing is, that I really hate jamping using > bookmarks, and I like to see things in front of me to work better. I wor

[Lazarus] Error when create a main window

2009-01-19 Thread Carlos German Tejero
Hi, i'm using lazarus v0.9.27 r18334 i386-win32-win32/win64 and fpc 2.2.3 on a WindowsXP64. I try to port a delphi program to lazarus/fpc, but when create then main window, the program raise an exception. The exception raise in Win32WSControls unit: {$ifdef WindowsUnicodeSupport}

Re: [Lazarus] Few features for Lazarus editor

2009-01-19 Thread Martin Friebe
> On 0.9.27, if you activate a new feature, and you stand on a string, > it marks all of the matching strings in the same file. It can be very > helpful if I could fixate such string when I'm looking at the code and > moving to see where the string in my context appears without the need > to use s

Re: [Lazarus] Few features for Lazarus editor

2009-01-19 Thread ik
On Mon, Jan 19, 2009 at 11:14 PM, Hans-Peter Diettrich wrote: > ik schrieb: > >> There are few features that I would like to see in the Lazarus editor: >> >> 1. Multiple spliting (and close the split) the editor to horizontal >> and vertical views > > Better: multiple edit windows, as Delphi has.

Re: [Lazarus] is it me or a bug that i ve been fighting?

2009-01-19 Thread waldo kitty
Martin Friebe wrote: > Anyway, unless you are willing to spent time on debugging the issue your > self, and go into the depth of the Connector code, this will probably be > of little help. i've finally been able to work out the following... MySQLConnection: TMySQL50Connection; TMySQL50Connec

[Lazarus] (no subject)

2009-01-19 Thread Mayte Carapeto
___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Re: [Lazarus] Few features for Lazarus editor

2009-01-19 Thread Hans-Peter Diettrich
ik schrieb: > There are few features that I would like to see in the Lazarus editor: > > 1. Multiple spliting (and close the split) the editor to horizontal > and vertical views Better: multiple edit windows, as Delphi has. > 2. VIM keyboard support > 3. Ability to have a way to fold code by us

Re: [Lazarus] Few features for Lazarus editor

2009-01-19 Thread Vincent Snijders
Paul Ishenin schreef: >> Should I add them to mantis as a wishlist ? >> > Add them to the wiki page with ideas and explain them there more > detailed: http://wiki.lazarus.freepascal.org/Feature_Ideas > When you have written a patch to implement the features, you can add them to Mantis. Vinc

[Lazarus] ?Linker Option Bug?

2009-01-19 Thread Andrew Brunner
I recently had an issue with building and needed to pass the linker a -fPIC parameter. I went to Project/Compiler Options/Linking and added -fPIC parameter and put a check mark near the option to enable the linking options and still had the error. I reported the issue as an FPC bug ( http://bugs.

Re: [Lazarus] Passing an array to a function

2009-01-19 Thread Andrew Brunner
Ok, But when reading or writing to the buffer you do need to reference the element in which you want to start writing/reading... In the case that entire buffer is to be written use [0]. You can't write the buffer itself as it's just a pointer... On Mon, Jan 19, 2009 at 9:35 AM, Dave Coventry

Re: [Lazarus] Passing an array to a function

2009-01-19 Thread Dave Coventry
Thanks Martin, that works. 2009/1/19 Dave Coventry : > Hi Andy, thanks for the response. > > The array was declared as > var fsbuffer: array of Byte; > > I tried your suggestion and typed the array as > Type TByteBuffer=Array of Byte; > > then declared the buffer > var fsbuffer: TByteBuffer; > > I

Re: [Lazarus] is it me or a bug that i ve been fighting?

2009-01-19 Thread waldo kitty
Martin Friebe wrote: > Open view->debug->stack window (alt-ctrl-s) > That will show you where in the Lazarus code the exception happened. > Problem: Likely it is in the fpc part, which will be useless numbers. Or > even in the mysql library. ahhh... that's more than i've seen before... i opene

Re: [Lazarus] Passing an array to a function

2009-01-19 Thread Dave Coventry
Hi Andy, thanks for the response. The array was declared as var fsbuffer: array of Byte; I tried your suggestion and typed the array as Type TByteBuffer=Array of Byte; then declared the buffer var fsbuffer: TByteBuffer; I also declared the function using 'var' as you suggested function FieldVa

Re: [Lazarus] Few features for Lazarus editor

2009-01-19 Thread Paul Ishenin
ik wrote: > Hello, > > There are few features that I would like to see in the Lazarus editor: > > 1. Multiple spliting (and close the split) the editor to horizontal > and vertical views > 2. VIM keyboard support > 3. Ability to have a way to fold code by using comments with special > chars (like (

Re: [Lazarus] Passing an array to a function

2009-01-19 Thread Martin Friebe
Not sure, but I would try something like FS.ReadBuffer(fsbuffer[0],recordsize); The function is declared as ReadBuffer(var Buffer; So in reality a pointer to the variable is passed to the function. Your dyn-array is already a pointer. You are passing in a pointer to the internal point

Re: [Lazarus] Passing an array to a function

2009-01-19 Thread Andrew Brunner
Hi Dave, My first comment would be you must declare the input as a variable. Next, I probably would type the Array out as well before using it. Type TByteBuffer=Array of Byte; function FieldValueAsString(var fsbuffer:TByteBuffer; fitype,fisize: integer): string; Byte arrays should not generate

Re: [Lazarus] Few features for Lazarus editor

2009-01-19 Thread Martin Friebe
ik wrote: > Hello, > > There are few features that I would like to see in the Lazarus editor: > > 1. Multiple spliting (and close the split) the editor to horizontal > and vertical views > 2. VIM keyboard support > 3. Ability to have a way to fold code by using comments with special > chars (like (

[Lazarus] Passing an array to a function

2009-01-19 Thread Dave Coventry
I have a function that I'm trying to pass an array to. function FieldValueAsString(fsbuffer: array of Byte; fitype,fisize: integer): string; Calling the function: setlength(fsbuffer,recordsize); FS:=TFileStream.Create(fname, fmshareDenyWrite); FS.Seek(seekpos,soFromBeginning); FS.ReadBuffer(fsbu

[Lazarus] Few features for Lazarus editor

2009-01-19 Thread ik
Hello, There are few features that I would like to see in the Lazarus editor: 1. Multiple spliting (and close the split) the editor to horizontal and vertical views 2. VIM keyboard support 3. Ability to have a way to fold code by using comments with special chars (like (* {{{ *) (* }}} ) that VIM

Re: [Lazarus] is it me or a bug that i ve been fighting?

2009-01-19 Thread Bart
On 1/19/09, waldo kitty wrote: > and that might be another "bug" or something where one can't install laz > 0.9.26 > to one directory and 0.9.27 to another and have each come out of the box > without > sharing any config settings or something... It can be done. Just start lazarus with --pcp

Re: [Lazarus] is it me or a bug that i ve been fighting?

2009-01-19 Thread Martin Friebe
waldo kitty wrote: > Martin Friebe wrote: > >> 2) You say you do not know the exact error: " because the popup box >> doesn't state it" => Try running the exe in the debugger, make sure you >> compile with debug symbols for gdb (-g, maybe also -gl). >> > > just following up on this (as my

Re: [Lazarus] is it me or a bug that i ve been fighting?

2009-01-19 Thread Martin Friebe
waldo kitty wrote: > Martin Friebe wrote: > >> but a couple of thinks that come to mind: >> 1) What version of FPC are you using (you only said you updated >> Lazarus); you refer to FPC 2.2.2, have you tried the fixes branch >> (2.2.3)? or trunc(2.3.1)? >> > > i'm using whatever comes wit

[Lazarus] lazdaemon

2009-01-19 Thread M.Ali VARDAR
Hi, I tried to use so many times lazdaemon for my daemon application. I don't understand. Why 'OnStart' event is not working? I just want to see how is working. I'm looking to 'Cleandirs' code and comparing with my simple application events. Everythings looking same. Did you used before lazdaemo