Re: [Lazarus] TTreenode.data

2013-09-16 Thread Richard Mace
Thanks Antonio, that worked fine. Goodness knows what I was originally doing! Richard > > Details are missing about your implementation: Lzarus & FPC, OS, etc. > I've made a little test on Win32 and Linux_X64, Lazarus 1.0.12 > I added some nodes to the TTreeView like this: > > var > SData: In

Re: [Lazarus] Mac (or other BigEndian machine) users needed to test new Utf8StringOfChar code

2013-09-16 Thread Hans-Peter Diettrich
Bart schrieb: Did you also test the simpler approach, replicating the pattern in one loop? It's independent of endianness, and can boil down to a single machine instruction (x86: REP MOVS). It would be repeating either 2,3, or 4-bytes each time. How would you code that? I would not care. f

Re: [Lazarus] TThread.CurrentThread fails on Linux

2013-09-16 Thread Sven Barth
On 16.09.2013 23:13, Mario R. Carro wrote: Hello all. In it's current form (r23227) CurrentThreadVar it's not initialized before calling Execute in the TThread implementation for Linux (Unix). Due to this the calls to TThread.CurrentThread always returns references to TExternalThread instances,

[Lazarus] TThread.CurrentThread fails on Linux

2013-09-16 Thread Mario R. Carro
Hello all. In it's current form (r23227) CurrentThreadVar it's not initialized before calling Execute in the TThread implementation for Linux (Unix). Due to this the calls to TThread.CurrentThread always returns references to TExternalThread instances, guessing that the current thread is not

Re: [Lazarus] PascalScript and Self instance

2013-09-16 Thread silvioprog
2013/9/16 silvioprog > 2013/9/16 Martin > >> What do you mean "passing the self const as default"? >> > > I'm trying it: > > TMyClass = class > private > FData: string; > public > procedure WriteLn(const S: string); > > ... > var > obj: TMyClass; > > ps.SetVarToInstance('SELF'

Re: [Lazarus] Mac (or other BigEndian machine) users needed to test new Utf8StringOfChar code

2013-09-16 Thread Hans-Peter Diettrich
Bart schrieb: Hi, Current code for Utf8StringOfChar that I wrote (in LazUtf8 unit) may fail due to Utf8 -> UTF16 -> FillWord -> Utf8 conversions, which only work for UCS2, as Mattias pointed out to me. I constructed a new Utf8StringOfChar function that builds UTF8 without conversions. For speed

[Lazarus] Creating a binary install file.

2013-09-16 Thread Terry A. Haimann
I have a Lazarus App that I would like to create a dpkg and maybe an rpm. Never done this and don't know how. The App currently uses MySQL and connects to it with ZeosDbo. Any help would be greatly appreciated. Thx in Advance, Terry -- ___ Lazarus

[Lazarus] Save/Discard dialog, keyboard answers

2013-09-16 Thread Jürgen Hestermann
When I close a file in Lazarus and is has been modified I am asked: File "xxx..xxx" has changed. Save? and there are 3 buttons: Save Discard changes Abort but only the "Save" button has an underlined letter (S) which I can type on the keybord to answer. If I want to "Discard changes" I don't k

Re: [Lazarus] PascalScript and Self instance

2013-09-16 Thread Martin
On 16/09/2013 18:54, Martin wrote: Hm... I saw all units of editormacroscript, but I still don't understand how the Lazarus team pass the SELF instance as default. :( Thank you anyway! What do you mean "passing the self const as default"? Ok, found the answer in the lpr. I would not expect

Re: [Lazarus] Creating a binary install file.

2013-09-16 Thread Mattias Gaertner
On Mon, 16 Sep 2013 11:29:35 -0500 "Terry A. Haimann" wrote: > I have a Lazarus App that I would like to create a dpkg and maybe an > rpm. Never done this and don't know how. The App currently uses MySQL > and connects to it with ZeosDbo. Any help would be greatly appreciated. Maybe this pa

Re: [Lazarus] PascalScript and Self instance

2013-09-16 Thread Martin
On 16/09/2013 18:42, silvioprog wrote: 2013/9/16 Martin mailto:laza...@mfriebe.de>> On 16/09/2013 18:03, silvioprog wrote: Hello, I'm trying to set an instance to after to call a method (called as WriteLn) of it, but the result is: [Error] (1:7): Unknown id

Re: [Lazarus] PascalScript and Self instance

2013-09-16 Thread silvioprog
2013/9/16 Martin > On 16/09/2013 18:03, silvioprog wrote: > >> Hello, >> >> I'm trying to set an instance to after to call a method (called as >> WriteLn) of it, but the result is: >> >> [Error] (1:7): Unknown identifier 'WriteLn' >> >> In attached the small project showing my implementation. >>

Re: [Lazarus] PascalScript and Self instance

2013-09-16 Thread silvioprog
2013/9/16 Martin > Ok, found the answer in the lpr. > > I would not expect that to work, after all you cant do it in normal pascal > either? > > the main begin end is a program does not belong to a class. > Writeln was only by way of illustration, it could be anything else. :) Problem solved w

Re: [Lazarus] Mac (or other BigEndian machine) users needed to test new Utf8StringOfChar code

2013-09-16 Thread Bart
On 9/16/13, Hans-Peter Diettrich wrote: > > Did you also test the simpler approach, replicating the pattern in one > loop? It's independent of endianness, and can boil down to a single > machine instruction (x86: REP MOVS). It would be repeating either 2,3, or 4-bytes each time. How would you co

Re: [Lazarus] PascalScript and Self instance

2013-09-16 Thread silvioprog
2013/9/16 Martin > What do you mean "passing the self const as default"? > I'm trying it: TMyClass = class private FData: string; public procedure WriteLn(const S: string); ... var obj: TMyClass; ps.SetVarToInstance('SELF', obj); So when I call "WriteLn", it must call Writ

Re: [Lazarus] PascalScript and Self instance

2013-09-16 Thread Martin
On 16/09/2013 18:58, silvioprog wrote: 2013/9/16 Martin mailto:laza...@mfriebe.de>> What do you mean "passing the self const as default"? I'm trying it: TMyClass = class private FData: string; public procedure WriteLn(const S: string); ... var obj: TMyClass; ps.SetVarT

Re: [Lazarus] PascalScript and Self instance

2013-09-16 Thread silvioprog
2013/9/16 silvioprog > 2013/9/16 Martin > >> Ok, found the answer in the lpr. >> >> I would not expect that to work, after all you cant do it in normal >> pascal either? >> >> the main begin end is a program does not belong to a class. >> > > Writeln was only by way of illustration, it could be

Re: [Lazarus] PascalScript and Self instance

2013-09-16 Thread Martin
On 16/09/2013 18:03, silvioprog wrote: Hello, I'm trying to set an instance to after to call a method (called as WriteLn) of it, but the result is: [Error] (1:7): Unknown identifier 'WriteLn' In attached the small project showing my implementation. So, how to I set an instance to be used as

[Lazarus] Mac (or other BigEndian machine) users needed to test new Utf8StringOfChar code

2013-09-16 Thread Bart
Hi, Current code for Utf8StringOfChar that I wrote (in LazUtf8 unit) may fail due to Utf8 -> UTF16 -> FillWord -> Utf8 conversions, which only work for UCS2, as Mattias pointed out to me. I constructed a new Utf8StringOfChar function that builds UTF8 without conversions. For speed reasons it uses

Re: [Lazarus] DB aware components

2013-09-16 Thread Antonio Fortuny
Same for TImageList. A TImageList is dropped onto a TDataModule, included in the interface uses, but a TToolBar does not see the TImagesList in the TDataModule. This breaks completely the porting from Delphi. I'm really very disapponted. I've made another test as explained in the Wiki page htt

Re: [Lazarus] DB aware components

2013-09-16 Thread Antonio Fortuny
In the same way, travelling within a TFrame components doesn't work too. When clicking over any component on the TFrame using either TAB or any other arrow key has no effect. At runtime, it works. Antonio. -- ___ Lazarus mailing list Lazarus@lists.

Re: [Lazarus] Project additions and overrides

2013-09-16 Thread Mattias Gaertner
On Mon, 16 Sep 2013 13:20:58 +0300 patspiper wrote: >[...] > Note: If a target is defined with nothing beneath it, it gets deleted > automatically when the compiler options are reopened. Is this by design? Yes. Mattias -- ___ Lazarus mailing list La

Re: [Lazarus] Project additions and overrides

2013-09-16 Thread patspiper
On 16/09/13 11:35, Mattias Gaertner wrote: On Sun, 15 Sep 2013 23:54:48 +0300 patspiper wrote: Hi, I am trying to add a new target (eg: abc) for the project options/additions and overrides. Once OK is pressed, re-entering the additions and overrides shows * instead of the specified target! L

Re: [Lazarus] DB aware components

2013-09-16 Thread Antonio Fortuny
Le 16/09/2013 11:12, Mattias Gaertner a écrit : On Mon, 16 Sep 2013 10:52:08 +0200 Antonio Fortuny wrote: Hi Folks. Is it normal that when a TDBGrid is dropped onto a TFrame (or descendant) the DataSource property cannot be assigned to a TSqlQuery dropped onto a TDataModule ? In other words,

Re: [Lazarus] DB aware components

2013-09-16 Thread Mattias Gaertner
On Mon, 16 Sep 2013 10:52:08 +0200 Antonio Fortuny wrote: > Hi Folks. > > Is it normal that when a TDBGrid is dropped onto a TFrame (or > descendant) the DataSource property cannot be assigned to a TSqlQuery > dropped onto a TDataModule ? In other words, in the properties > inspectior of the

Re: [Lazarus] Form size locked

2013-09-16 Thread Mark Morgan Lloyd
Mattias Gaertner wrote: On Sun, 15 Sep 2013 13:17:42 + Mark Morgan Lloyd wrote: It appears that a bsDialog form has its actual width and height locked once it has been displayed by ShowModal. Components inside the form, e.g. a PageControl with client alignment, see the dimensions that hav

[Lazarus] DB aware components

2013-09-16 Thread Antonio Fortuny
Hi Folks. Is it normal that when a TDBGrid is dropped onto a TFrame (or descendant) the DataSource property cannot be assigned to a TSqlQuery dropped onto a TDataModule ? In other words, in the properties inspectior of the TDBGrid, the Datasource property shows nothing. The TDataModule is in

Re: [Lazarus] Project additions and overrides

2013-09-16 Thread Mattias Gaertner
On Sun, 15 Sep 2013 23:54:48 +0300 patspiper wrote: > Hi, > > I am trying to add a new target (eg: abc) for the project > options/additions and overrides. Once OK is pressed, re-entering the > additions and overrides shows * instead of the specified target! > > Lazarus 1.3 r42824 FPC 2.6.3 i3

Re: [Lazarus] global items in TApplication

2013-09-16 Thread Graeme Geldenhuys
On 2013-09-15 15:57, Martin wrote: > global war, but in implementation > Correct, or just use a "lazyman's singleton" function. 8<-8<-8<-8<-8< interface function GlobalFoo: TFoo; implementation var uFoo: TFoo; function GlobalFoo: TF