Re: [Lazarus] Sciter for Lazarus: VCL Handle vs. LCL Handle

2023-06-14 Thread Marcos Douglas B. Santos via lazarus
On Wed, Jun 14, 2023 at 7:43 AM Marcos Douglas B. Santos  
wrote:
>
> On Wed, Jun 14, 2023 at 6:47 AM Michael Van Canneyt via lazarus
>  wrote:
> >
> > On Tue, 13 Jun 2023, Marcos Douglas B. Santos via lazarus wrote:
> >
> > > Hi,
> > > I'm trying to run Sciter.TIS https://sciter.com/download/ on Lazarus, 
> > > which could be an open source project in the future — yes,
> > > not the newer version (named Sciter.JS) as I don't need these new 
> > > features.
> > >
> > > I've started looking into https://github.com/da-baranov/SciDe (~8 years 
> > > ago). Then, I discovered a fork
> > > https://github.com/Mikanoshi/SciDe (~5 years old) and forked from it 
> > > because it is "newer".
> > >
> > > The da-baranov's original repository already tried to run on Lazarus, but 
> > > they have an issue which couldn't be solved:
> > > https://github.com/da-baranov/SciDe/issues/3#issuecomment-87698772
> >
> > If you look at the issue, you see there is a commit that claims to solve
> > this issue. Did you test if that commit is incorporated in your code ?
>
> Yes, it is incorporated. First I checked it, but later forked the
> repository from the author of this commit (mr. Mikanoshi), which is
> newer...
> But it didn't work.
>
> > > I have the same issue, even using the newer version...
> > > When it calls API.SciterWindowAttachEventHandler() here
> > > https://github.com/Mikanoshi/SciDe/blob/master/source/Sciter.pas#L1439-L1440,
> > >  the result is always SCDOM_INVALID_HWND.
> > >
> > > Why am I asking this here? Well, the project claims that it works from 
> > > Delphi 7 to newer; they could compile on Lazarus; I also
> > > could compile (creating a package, a component, etc) on Lazarus; but it 
> > > do not work because something looks like different about
> > > how a Handle works on VCL comparing to LCL.
> >
> > On windows, the handle should work the same. If you're working on another
> > platform, then it works very different, and then you'll need to see what 
> > sciter
> > actually expects.
>
> I would like it to work on Windows, Linux and MacOS, but for now I
> will be glad that it only works on Windows.

Michael,
Do you have any more ideas to try to solve this issue?

Thanks,

best regards,
Marcos Douglas
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Sciter for Lazarus: VCL Handle vs. LCL Handle

2023-06-14 Thread Marcos Douglas B. Santos via lazarus
On Wed, Jun 14, 2023 at 6:47 AM Michael Van Canneyt via lazarus
 wrote:
>
> On Tue, 13 Jun 2023, Marcos Douglas B. Santos via lazarus wrote:
>
> > Hi,
> > I'm trying to run Sciter.TIS https://sciter.com/download/ on Lazarus, which 
> > could be an open source project in the future — yes,
> > not the newer version (named Sciter.JS) as I don't need these new features.
> >
> > I've started looking into https://github.com/da-baranov/SciDe (~8 years 
> > ago). Then, I discovered a fork
> > https://github.com/Mikanoshi/SciDe (~5 years old) and forked from it 
> > because it is "newer".
> >
> > The da-baranov's original repository already tried to run on Lazarus, but 
> > they have an issue which couldn't be solved:
> > https://github.com/da-baranov/SciDe/issues/3#issuecomment-87698772
>
> If you look at the issue, you see there is a commit that claims to solve
> this issue. Did you test if that commit is incorporated in your code ?

Yes, it is incorporated. First I checked it, but later forked the
repository from the author of this commit (mr. Mikanoshi), which is
newer...
But it didn't work.

> > I have the same issue, even using the newer version...
> > When it calls API.SciterWindowAttachEventHandler() here
> > https://github.com/Mikanoshi/SciDe/blob/master/source/Sciter.pas#L1439-L1440,
> >  the result is always SCDOM_INVALID_HWND.
> >
> > Why am I asking this here? Well, the project claims that it works from 
> > Delphi 7 to newer; they could compile on Lazarus; I also
> > could compile (creating a package, a component, etc) on Lazarus; but it do 
> > not work because something looks like different about
> > how a Handle works on VCL comparing to LCL.
>
> On windows, the handle should work the same. If you're working on another
> platform, then it works very different, and then you'll need to see what 
> sciter
> actually expects.

I would like it to work on Windows, Linux and MacOS, but for now I
will be glad that it only works on Windows.

Marcos Douglas
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Sciter for Lazarus: VCL Handle vs. LCL Handle

2023-06-13 Thread Marcos Douglas B. Santos via lazarus
Hi,

I'm trying to run Sciter.TIS https://sciter.com/download/ on Lazarus, which
could be an open source project in the future — yes, not the newer version
(named Sciter.JS) as I don't need these new features.

I've started looking into https://github.com/da-baranov/SciDe (~8 years
ago). Then, I discovered a fork https://github.com/Mikanoshi/SciDe (~5
years old) and forked from it because it is "newer".

The da-baranov's original repository already tried to run on Lazarus, but
they have an issue which couldn't be solved:
https://github.com/da-baranov/SciDe/issues/3#issuecomment-87698772

I have the same issue, even using the newer version...
When it calls API.SciterWindowAttachEventHandler() here
https://github.com/Mikanoshi/SciDe/blob/master/source/Sciter.pas#L1439-L1440,
the result is always SCDOM_INVALID_HWND.

Why am I asking this here? Well, the project claims that it works from
Delphi 7 to newer; they could compile on Lazarus; I also could compile
(creating a package, a component, etc) on Lazarus; but it do not work
because something looks like different about how a Handle works on VCL
comparing to LCL.

Please, do you have any ideas?

Best regards,
Marcos Douglas
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Simplest way to update a .lfm using a Component Editor

2022-05-20 Thread Marcos Douglas B. Santos via lazarus
On Fri, May 20, 2022 at 12:58 PM Marcos Douglas B. Santos
 wrote:
>
> On Fri, May 20, 2022 at 12:38 PM Marcos Douglas B. Santos
>  wrote:
> >
> > On Fri, May 20, 2022 at 12:00 PM Marcos Douglas B. Santos
> >  wrote:
> > >
> > > On Fri, May 20, 2022 at 11:50 AM Mattias Gaertner via lazarus
> > >  wrote:
> > > >
> > > > On Fri, 20 May 2022 11:28:59 -0300
> > > > "Marcos Douglas B. Santos via lazarus" 
> > > > wrote:
> > > >
> > > > > Hello,
> > > > > I wrote a component which has a Component Editor.
> > > > > How is the simplest way to update the .lfm form, using this Component
> > > > > Editor?
> > > >
> > > > What do you mean with "update the lfm"?
> > >
> > > If the Component Editor (CE) changes some property on its owner
> > > (component), it doesn't reflect on form .lfm where this component is.
> > > If the CE changes something, I would like that the IDE enabled "Save
> > > button"; then, saving the form .lfm, it will be modified.
> > >
> > > For example, I was search some example on fieldseditor, fieldslist,
> > > newfield units—as the "Field Editor" creates fields in .lfm when user
> > > close it—uses a lot FDesigner instance such
> > > FDesigner.PropertyEditorHook.PersistendAdded, FDesigner.Modified, etc
> >
> > Ok, I realized that my problem depends on the case. Another Component
> > Editor (CE), for another component works.
> > So, I think I need to give more details: the problem occurs using a CE
> > for a ToolBar descendent.
> > The CE can add/delete/order the buttons. After user close CE using
> > mrOK, the code remove all buttons, then include new ones
> > https://github.com/tranquilit/pltis_uicomponents/blob/master/src/standard/tis.ui.toolbar.editor.pas#L146-L166
> > but it doesn't reflect on IDE.
>
> All right, I guess I need to add new buttons as
> TToolBarComponentEditor does, I mean, using Hook.PersistentAdded and
> Modified at the end.
> I will tell you when I have news...

I was right about PersistentAdded... anyway, it's working now
https://github.com/tranquilit/pltis_uicomponents/commit/f977bf24077f0cad56c02b8ffdf5b834c8800441
Sorry the noise.

Marcos Douglas
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Simplest way to update a .lfm using a Component Editor

2022-05-20 Thread Marcos Douglas B. Santos via lazarus
On Fri, May 20, 2022 at 12:38 PM Marcos Douglas B. Santos
 wrote:
>
> On Fri, May 20, 2022 at 12:00 PM Marcos Douglas B. Santos
>  wrote:
> >
> > On Fri, May 20, 2022 at 11:50 AM Mattias Gaertner via lazarus
> >  wrote:
> > >
> > > On Fri, 20 May 2022 11:28:59 -0300
> > > "Marcos Douglas B. Santos via lazarus" 
> > > wrote:
> > >
> > > > Hello,
> > > > I wrote a component which has a Component Editor.
> > > > How is the simplest way to update the .lfm form, using this Component
> > > > Editor?
> > >
> > > What do you mean with "update the lfm"?
> >
> > If the Component Editor (CE) changes some property on its owner
> > (component), it doesn't reflect on form .lfm where this component is.
> > If the CE changes something, I would like that the IDE enabled "Save
> > button"; then, saving the form .lfm, it will be modified.
> >
> > For example, I was search some example on fieldseditor, fieldslist,
> > newfield units—as the "Field Editor" creates fields in .lfm when user
> > close it—uses a lot FDesigner instance such
> > FDesigner.PropertyEditorHook.PersistendAdded, FDesigner.Modified, etc
>
> Ok, I realized that my problem depends on the case. Another Component
> Editor (CE), for another component works.
> So, I think I need to give more details: the problem occurs using a CE
> for a ToolBar descendent.
> The CE can add/delete/order the buttons. After user close CE using
> mrOK, the code remove all buttons, then include new ones
> https://github.com/tranquilit/pltis_uicomponents/blob/master/src/standard/tis.ui.toolbar.editor.pas#L146-L166
> but it doesn't reflect on IDE.

All right, I guess I need to add new buttons as
TToolBarComponentEditor does, I mean, using Hook.PersistentAdded and
Modified at the end.
I will tell you when I have news...

Marcos Douglas
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Simplest way to update a .lfm using a Component Editor

2022-05-20 Thread Marcos Douglas B. Santos via lazarus
On Fri, May 20, 2022 at 12:00 PM Marcos Douglas B. Santos
 wrote:
>
> On Fri, May 20, 2022 at 11:50 AM Mattias Gaertner via lazarus
>  wrote:
> >
> > On Fri, 20 May 2022 11:28:59 -0300
> > "Marcos Douglas B. Santos via lazarus" 
> > wrote:
> >
> > > Hello,
> > > I wrote a component which has a Component Editor.
> > > How is the simplest way to update the .lfm form, using this Component
> > > Editor?
> >
> > What do you mean with "update the lfm"?
>
> If the Component Editor (CE) changes some property on its owner
> (component), it doesn't reflect on form .lfm where this component is.
> If the CE changes something, I would like that the IDE enabled "Save
> button"; then, saving the form .lfm, it will be modified.
>
> For example, I was search some example on fieldseditor, fieldslist,
> newfield units—as the "Field Editor" creates fields in .lfm when user
> close it—uses a lot FDesigner instance such
> FDesigner.PropertyEditorHook.PersistendAdded, FDesigner.Modified, etc

Ok, I realized that my problem depends on the case. Another Component
Editor (CE), for another component works.
So, I think I need to give more details: the problem occurs using a CE
for a ToolBar descendent.
The CE can add/delete/order the buttons. After user close CE using
mrOK, the code remove all buttons, then include new ones
https://github.com/tranquilit/pltis_uicomponents/blob/master/src/standard/tis.ui.toolbar.editor.pas#L146-L166
but it doesn't reflect on IDE.

Marcos Douglas
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Simplest way to update a .lfm using a Component Editor

2022-05-20 Thread Marcos Douglas B. Santos via lazarus
On Fri, May 20, 2022 at 11:50 AM Mattias Gaertner via lazarus
 wrote:
>
> On Fri, 20 May 2022 11:28:59 -0300
> "Marcos Douglas B. Santos via lazarus" 
> wrote:
>
> > Hello,
> > I wrote a component which has a Component Editor.
> > How is the simplest way to update the .lfm form, using this Component
> > Editor?
>
> What do you mean with "update the lfm"?

If the Component Editor (CE) changes some property on its owner
(component), it doesn't reflect on form .lfm where this component is.
If the CE changes something, I would like that the IDE enabled "Save
button"; then, saving the form .lfm, it will be modified.

For example, I was search some example on fieldseditor, fieldslist,
newfield units—as the "Field Editor" creates fields in .lfm when user
close it—uses a lot FDesigner instance such
FDesigner.PropertyEditorHook.PersistendAdded, FDesigner.Modified, etc

Marcos Douglas
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Simplest way to update a .lfm using a Component Editor

2022-05-20 Thread Marcos Douglas B. Santos via lazarus
Hello,
I wrote a component which has a Component Editor.
How is the simplest way to update the .lfm form, using this Component
Editor?
I took a look in fieldseditor to get some example, but I guess the code
there is more complicated than I need it.

best regards,
Marcos Douglas
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] TComboBox using csSimple, but with a dropdown list

2021-12-08 Thread Marcos Douglas B. Santos via lazarus
Hi,

Is it possible to have a TComboBox, Style=csSimple, but with a dropdown
list?
I would like to have a combo with no arrow, as csSimple style, but with the
dropdown (auto) list. Even though TComboBox has the option to hide the
arrow, the dropdown list doesn't work.

best regards,
Marcos Douglas
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] TextHint in TComboBox

2021-11-16 Thread Marcos Douglas B. Santos via lazarus
On Mon, Nov 15, 2021 at 4:50 PM Juha Manninen via lazarus
 wrote:
>
> On Mon, Nov 15, 2021 at 8:12 PM Marcos Douglas B. Santos via lazarus 
>  wrote:
>>
>> Yes, I'll try to copy from 2.2RC. Thank you.
>
>
> Why can't you use 2.2RC directly? It is very close to the final 2.2.
> Do you experience a regression bug there?

I need to use the same version which all developers in the company are using.
But we're testing 2.2RC to see if we can upgrade directly. Thanks.

Marcos Douglas
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] TextHint in TComboBox

2021-11-15 Thread Marcos Douglas B. Santos via lazarus
On Mon, Nov 15, 2021 at 2:40 PM Bart via lazarus
 wrote:
>
> On Mon, Nov 15, 2021 at 5:04 PM Marcos Douglas B. Santos via lazarus
>  wrote:
>
> > Yes, after finding the bug issue that I posted in the last email, I
> > tested using trunk...
> > But I'm using 2.0.12.
>
> Well, either copy the relevant parts to your 2.0.12, use the 2.2RC or
> wait just a little bit more for the final release...

Yes, I'll try to copy from 2.2RC. Thank you.

Marcos Douglas
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] TextHint in TComboBox

2021-11-15 Thread Marcos Douglas B. Santos via lazarus
On Mon, Nov 15, 2021 at 12:56 PM Werner Pamler via lazarus
 wrote:
>
> Am 15.11.2021 um 16:37 schrieb Marcos Douglas B. Santos via lazarus:
> > I need to implement a TextHint property—as we have in TEdit— in a
> >  component inherited from TComboBox. Doesn't matter if it will be
> > "emulated" or not.
> >
> > My first thought was copying from TEdit... however, is this the better
> > way?
> > Maybe sharing this code, in Lazarus code, for other components, would
> > be a better design instead of inside TEdit?
> It's already there, at least in Laz 2.2+.

Yes, after finding the bug issue that I posted in the last email, I
tested using trunk...
But I'm using 2.0.12.

regards,
Marcos Douglas
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] TextHint in TComboBox

2021-11-15 Thread Marcos Douglas B. Santos via lazarus
On Mon, Nov 15, 2021 at 12:37 PM Marcos Douglas B. Santos
 wrote:
>
> Hi,
> I need to implement a TextHint property—as we have in TEdit— in a  component 
> inherited from TComboBox. Doesn't matter if it will be "emulated" or not.
>
> My first thought was copying from TEdit... however, is this the better way?
> Maybe sharing this code, in Lazarus code, for other components, would be a 
> better design instead of inside TEdit?

I've found this https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/30682

Marcos Douglas
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] TextHint in TComboBox

2021-11-15 Thread Marcos Douglas B. Santos via lazarus
Hi,
I need to implement a TextHint property—as we have in TEdit— in a
 component inherited from TComboBox. Doesn't matter if it will be
"emulated" or not.

My first thought was copying from TEdit... however, is this the better way?
Maybe sharing this code, in Lazarus code, for other components, would be a
better design instead of inside TEdit?

best regards,
Marcos Douglas
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Unable to show method

2021-09-14 Thread Marcos Douglas B. Santos via lazarus
On Tue, Sep 14, 2021 at 11:29 AM John Landmesser via lazarus
 wrote:
>
> Am 14.09.21 um 12:56 schrieb Marcos Douglas B. Santos via lazarus:
> > Hello,
> >
> > I have an issue creating a new component, but it can be reproduce
> > easily using a default component:
> > - drop a TPopupMenu
> > - on Object Inspector, go to Events tab
> > - double-click in `Items.OnClick` to implement
> > - you will get the message: "Unable to show method. Please fix the
> > error shown in the message window which is normally below the source
> > editor."
> >
> > There is no message in Message Windows.
> >
> > Lazarus 2.0.12 r64642 FPC 3.2.0 i386-win32-win32/win64
> > Lazarus 2.0.13 r64940M FPC 3.2.0 i386-win32-win32/win64
> >
> > Should I open a ticket?
> >
> > best regards,
> > Marcos Douglas
> >
>
> Tested on Lazarus 2.3.0 rmain-2_3-337-gfc99cfa6ee FPC 3.2.2
> x86_64-linux-gtk2
>
> You need to have at least one item WITH(!) a name.
>
> Without an item with name i get your error.

Hello John,
But the IDE gives the name, automatically... I didn't understand what you meant.
And it happens in TPopupMenu, a default component that came with Lazarus.

Marcos Douglas
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Unable to show method

2021-09-14 Thread Marcos Douglas B. Santos via lazarus
Hello,

I have an issue creating a new component, but it can be reproduce easily
using a default component:
- drop a TPopupMenu
- on Object Inspector, go to Events tab
- double-click in `Items.OnClick` to implement
- you will get the message: "Unable to show method. Please fix the error
shown in the message window which is normally below the source editor."

There is no message in Message Windows.

Lazarus 2.0.12 r64642 FPC 3.2.0 i386-win32-win32/win64
Lazarus 2.0.13 r64940M FPC 3.2.0 i386-win32-win32/win64

Should I open a ticket?

best regards,
Marcos Douglas
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Possible bug in TFrame

2021-08-22 Thread Marcos Douglas B. Santos via lazarus
On Fri, Aug 20, 2021 at 4:42 AM Juha Manninen via lazarus <
lazarus@lists.lazarus-ide.org> wrote:

> Yes, both ways are OK, although publishing the component is better. I am
> not the only developer here. Others may want to reproduce the bug, too.
> Open source you know.
> I suggest you study your component a little more. Strip out parts which
> have no effect on the bug. Finally you figure out the problematic part. It
> was not a TCollection, so it must be something else.
> Then you may be able to create a minimal example to reproduce the bug.
>

Juha,
On Gitlab, @flavio.etrusco gave us a hint, which it solved my problem (with
the first component, then I will check others)
->
https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/25124#note_657170206

But the same question that I've asked him there, I ask you — please take a
look at the link, and we can continue there, if it's Ok for you. Thank you.

regards,
Marcos Douglas
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Possible bug in TFrame

2021-08-19 Thread Marcos Douglas B. Santos via lazarus
On Wed, Aug 18, 2021 at 8:55 AM Marcos Douglas B. Santos  
wrote:
>
> On Wed, Aug 18, 2021 at 8:45 AM Juha Manninen via lazarus
>  wrote:
> >
> > Is there an example project without external packages or customdrawn 
> > widgetset?
> > Customdrawn widgetset is incomplete and broken at least here in my Linux 
> > system.
> > If not, then please upload such a project into one of the tickets.
>
> I'm not using CustomDrawn. I created a component that has TCollection
> as published property. That's it.
> I'll create a demo and component example, create a ticket and post it
> here soon. Thanks.

Hello, Juha,

It has a problem for sure—as the component(s) works on Form but not on
Frame—but I wasn't able to reproduce the error using a simple demo +
"fake component".
I thought the problem was because of a published TCollection property,
but it wasn't.

If I publish the full source of the component—which is not a big
deal—or send it to you in private, could you test it using the Demo
which exists already?

Sorry about my delay.

best regards,
Marcos Douglas
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Possible bug in TFrame

2021-08-18 Thread Marcos Douglas B. Santos via lazarus
On Wed, Aug 18, 2021 at 8:45 AM Juha Manninen via lazarus
 wrote:
>
> Is there an example project without external packages or customdrawn 
> widgetset?
> Customdrawn widgetset is incomplete and broken at least here in my Linux 
> system.
> If not, then please upload such a project into one of the tickets.

I'm not using CustomDrawn. I created a component that has TCollection
as published property. That's it.
I'll create a demo and component example, create a ticket and post it
here soon. Thanks.

Marcos Douglas
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Possible bug in TFrame

2021-08-18 Thread Marcos Douglas B. Santos via lazarus
On Sun, Aug 15, 2021 at 9:03 AM Marcos Douglas B. Santos  
wrote:
>
> On Tue, Jul 15, 2014 at 11:55 AM Darío J. Vázquez Arguija
>  wrote:
> >
> > To Whom It May Concern:
> >
> > I have detected a possible bug in the frames of Lazarus (1.0, 1.2.2, 
> > 1.3trunk) the problem manifests itself when the implemented component is 
> > embedded in frame and then try to run the program, which throws an error 
> > (The Control'' has no parent window), fortunately I don't have to send my 
> > code for some of their own components manifests.
> >
> > Please install the customdrawn package that comes with lazarus, create a 
> > frame insert one CDPageControl create CDTabSheet a page or two and then try 
> > to insert the frame within a form. It goes without saying that out of the 
> > frames components work perfectly .
> >
> > This is a bug already known??
>
> I'm using the original mail above (2014!) because the same problem
> still exists in the current version.
>
> This won't happen with all frames, but just ones that have components
> with published properties as TCollection type, for example.
>
> Using fpcupdeluxe on Windows:
> - first, I have installed the version that still uses SVN (FPC 3.2.0
> rev 45643, Laz rev 64642), and the problem still there;
> - then, I have used the new fpcupdeluxe version that uses Git instead
> SVN, selecting the branches fpc-3.2.0 + laz-stable, and the problem
> still there;
> - then, keeping FPC as 3.2.0 (from now on), I selected the branches
> fpc-3.2.0 + laz-2.0.12, and the problem still there;
> - then, I have tried using branch fixes-2.2—which we couldn't use it
> in production yet, as I realized this branch has renamed some
> packages/components, adding "Laz" as prefix, which will broke the
> projects for the team which I'm work with—and the problem still there;
> - almost giving up, I have tried a downgrade for 2.0.10 (which uses
> rev 63526)—only testing—and the problem still there;
> - finally, I have tried using the trunk (Lazarus 2.3.0 rev
> main-0-gfb27fcd12a) and the problem is still there!!!  :\
>
> I believe anyone can reproduce the same explained above using any
> component that has at least one published property as TCollection.
>
> Can someone propose a solution and merge it on, at least, fixes-2.0 please?

Nobody has the same problem?
If you cannot reproduce, would you like a demo or so?
Should I open a new ticket for it on GitLab?

best regards,
Marcos Doulgas
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Possible bug in TFrame

2021-08-16 Thread Marcos Douglas B. Santos via lazarus
On Mon, Aug 16, 2021 at 9:06 AM Marcos Douglas B. Santos  
wrote:
>
> On Sun, Aug 15, 2021 at 9:03 AM Marcos Douglas B. Santos  
> wrote:
> >
> > On Tue, Jul 15, 2014 at 11:55 AM Darío J. Vázquez Arguija
> >  wrote:
> > >
> > > To Whom It May Concern:
> > >
> > > I have detected a possible bug in the frames of Lazarus (1.0, 1.2.2, 
> > > 1.3trunk) the problem manifests itself when the implemented component is 
> > > embedded in frame and then try to run the program, which throws an error 
> > > (The Control'' has no parent window), fortunately I don't have to send my 
> > > code for some of their own components manifests.
> > >
> > > Please install the customdrawn package that comes with lazarus, create a 
> > > frame insert one CDPageControl create CDTabSheet a page or two and then 
> > > try to insert the frame within a form. It goes without saying that out of 
> > > the frames components work perfectly .
> > >
> > > This is a bug already known??
> >
> > I'm using the original mail above (2014!) because the same problem
> > still exists in the current version.
> >
> > This won't happen with all frames, but just ones that have components
> > with published properties as TCollection type, for example.
> >
> > Using fpcupdeluxe on Windows:
> > - first, I have installed the version that still uses SVN (FPC 3.2.0
> > rev 45643, Laz rev 64642), and the problem still there;
> > - then, I have used the new fpcupdeluxe version that uses Git instead
> > SVN, selecting the branches fpc-3.2.0 + laz-stable, and the problem
> > still there;
> > - then, keeping FPC as 3.2.0 (from now on), I selected the branches
> > fpc-3.2.0 + laz-2.0.12, and the problem still there;
> > - then, I have tried using branch fixes-2.2—which we couldn't use it
> > in production yet, as I realized this branch has renamed some
> > packages/components, adding "Laz" as prefix, which will broke the
> > projects for the team which I'm work with—and the problem still there;
> > - almost giving up, I have tried a downgrade for 2.0.10 (which uses
> > rev 63526)—only testing—and the problem still there;
> > - finally, I have tried using the trunk (Lazarus 2.3.0 rev
> > main-0-gfb27fcd12a) and the problem is still there!!!  :\
> >
> > I believe anyone can reproduce the same explained above using any
> > component that has at least one published property as TCollection.
> >
> > Can someone propose a solution and merge it on, at least, fixes-2.0 please?
>
> This didn't work either:
> https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/17071#note_637425762
>
> Problems with Frames are very old...

This one has "status confirmed", created 7 years ago:
https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/25124

best regards,
Marcos Douglas
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Possible bug in TFrame

2021-08-16 Thread Marcos Douglas B. Santos via lazarus
On Sun, Aug 15, 2021 at 9:03 AM Marcos Douglas B. Santos  
wrote:
>
> On Tue, Jul 15, 2014 at 11:55 AM Darío J. Vázquez Arguija
>  wrote:
> >
> > To Whom It May Concern:
> >
> > I have detected a possible bug in the frames of Lazarus (1.0, 1.2.2, 
> > 1.3trunk) the problem manifests itself when the implemented component is 
> > embedded in frame and then try to run the program, which throws an error 
> > (The Control'' has no parent window), fortunately I don't have to send my 
> > code for some of their own components manifests.
> >
> > Please install the customdrawn package that comes with lazarus, create a 
> > frame insert one CDPageControl create CDTabSheet a page or two and then try 
> > to insert the frame within a form. It goes without saying that out of the 
> > frames components work perfectly .
> >
> > This is a bug already known??
>
> I'm using the original mail above (2014!) because the same problem
> still exists in the current version.
>
> This won't happen with all frames, but just ones that have components
> with published properties as TCollection type, for example.
>
> Using fpcupdeluxe on Windows:
> - first, I have installed the version that still uses SVN (FPC 3.2.0
> rev 45643, Laz rev 64642), and the problem still there;
> - then, I have used the new fpcupdeluxe version that uses Git instead
> SVN, selecting the branches fpc-3.2.0 + laz-stable, and the problem
> still there;
> - then, keeping FPC as 3.2.0 (from now on), I selected the branches
> fpc-3.2.0 + laz-2.0.12, and the problem still there;
> - then, I have tried using branch fixes-2.2—which we couldn't use it
> in production yet, as I realized this branch has renamed some
> packages/components, adding "Laz" as prefix, which will broke the
> projects for the team which I'm work with—and the problem still there;
> - almost giving up, I have tried a downgrade for 2.0.10 (which uses
> rev 63526)—only testing—and the problem still there;
> - finally, I have tried using the trunk (Lazarus 2.3.0 rev
> main-0-gfb27fcd12a) and the problem is still there!!!  :\
>
> I believe anyone can reproduce the same explained above using any
> component that has at least one published property as TCollection.
>
> Can someone propose a solution and merge it on, at least, fixes-2.0 please?

This didn't work either:
https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/17071#note_637425762

Problems with Frames are very old...

Marcos Douglas
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Possible bug in TFrame

2021-08-15 Thread Marcos Douglas B. Santos via lazarus
On Tue, Jul 15, 2014 at 11:55 AM Darío J. Vázquez Arguija
 wrote:
>
> To Whom It May Concern:
>
> I have detected a possible bug in the frames of Lazarus (1.0, 1.2.2, 
> 1.3trunk) the problem manifests itself when the implemented component is 
> embedded in frame and then try to run the program, which throws an error (The 
> Control'' has no parent window), fortunately I don't have to send my code for 
> some of their own components manifests.
>
> Please install the customdrawn package that comes with lazarus, create a 
> frame insert one CDPageControl create CDTabSheet a page or two and then try 
> to insert the frame within a form. It goes without saying that out of the 
> frames components work perfectly .
>
> This is a bug already known??

I'm using the original mail above (2014!) because the same problem
still exists in the current version.

This won't happen with all frames, but just ones that have components
with published properties as TCollection type, for example.

Using fpcupdeluxe on Windows:
- first, I have installed the version that still uses SVN (FPC 3.2.0
rev 45643, Laz rev 64642), and the problem still there;
- then, I have used the new fpcupdeluxe version that uses Git instead
SVN, selecting the branches fpc-3.2.0 + laz-stable, and the problem
still there;
- then, keeping FPC as 3.2.0 (from now on), I selected the branches
fpc-3.2.0 + laz-2.0.12, and the problem still there;
- then, I have tried using branch fixes-2.2—which we couldn't use it
in production yet, as I realized this branch has renamed some
packages/components, adding "Laz" as prefix, which will broke the
projects for the team which I'm work with—and the problem still there;
- almost giving up, I have tried a downgrade for 2.0.10 (which uses
rev 63526)—only testing—and the problem still there;
- finally, I have tried using the trunk (Lazarus 2.3.0 rev
main-0-gfb27fcd12a) and the problem is still there!!!  :\

I believe anyone can reproduce the same explained above using any
component that has at least one published property as TCollection.

Can someone propose a solution and merge it on, at least, fixes-2.0 please?

best regards,
Marcos Douglas
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] getlazarus.org search request

2019-08-12 Thread Marcos Douglas B. Santos via lazarus
On Mon, Aug 12, 2019 at 6:36 AM Michael Van Canneyt via lazarus
 wrote:
>
> [...] FPC+Lazarus effectively covers all scenarios :-)

No doubt about that for sure.

Marcos Douglas
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] A SQL Explorer Program. Suggestions?

2019-08-01 Thread Marcos Douglas B. Santos via lazarus
On Wed, Jul 24, 2019 at 8:19 AM Anthony Walter via lazarus
 wrote:
>
> I am looking for a good SQL Explorer tool that I can build using Lazarus. 
> Does anyone have any options on what's already available?

Another one:
https://github.com/synopse/mORMot/tree/master/SQLite3/Samples/12%20-%20SynDB%20Explorer

regards,
Marcos Douglas
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Adding Required Packages paths... dynamically

2019-07-21 Thread Marcos Douglas B. Santos via lazarus
On Sat, Jul 20, 2019 at 6:24 AM Mattias Gaertner via lazarus
 wrote:
>
> On Fri, 19 Jul 2019 00:26:49 -0300
> "Marcos Douglas B. Santos via lazarus" 
> wrote:
>
> > Hi,
> >
> > Imagine a package that has a dependency for another one. However, this
> > dependency has a conditional to exists. So, I cannot add the Required
> > Package by default — I'm talking about ZeosLib.
> >
> > Then, I used Conditionals (script) for adding ZeosLib paths (-Fu, -Fi)
> > into the paths of the package — amazing work in IDE, by the way.
> >
> > In Custom Options | Conditionals, I have something like this:
> > ===begin===
> > if undefined(NOSYNDBZEOS) then
> > begin
> >   UnitPath +=
> > ';$PkgOutDir(zcore);$PkgOutDir(zdbc);$PkgOutDir(zparsesql);$PkgOutDir(zplain)';
> > IncPath += ';$(ProjOutDir);$PkgDir(zcore)\..\..\src'; end;
> > ===end===
> >
> > And it works. If user add the package into a project, he/she could
> > compile with/without support to ZeosLib, just checking/unchecking some
> > definition into Defines button. Excellent.
> >
> > However, my only problem occur if user add zcomponent package, which
> > belongs to ZeosLib. If so, I get some hints like this:
> > ```
> > Note: Duplicate unit "ZVariant" in "mormot_base 1.18", orphaned ppu
> > "\zeos\packages\lazarus\lib\zcore\x86_64-win64\ZVariant.ppu"
> > Note: Duplicate unit "ZVariant" in "zcore 7.2.5",
> > ppu="\zeos\packages\lazarus\lib\zcore\x86_64-win64\ZVariant.ppu",
> > source="\zeos\src\core\ZVariant.pas"
>
> It means: Two packages reach the same ppu and only one has a source
> file. Hmm, that should not create a note.
> I fixed a check in rev61607, please test with trunk.

Thanks.
Do you think this is a hack to add packages dynamically, or is it the right way?

regards,
Marcos Douglas
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Adding Required Packages paths... dynamically

2019-07-19 Thread Marcos Douglas B. Santos via lazarus
On Fri, Jul 19, 2019 at 10:30 AM Tony Whyman via lazarus
 wrote:
>
> My understanding is that when you add a "required package" what actually
> happens is that the IDE adds the package unit paths to the list of unit
> paths for your project, and adds the top level .pas file for the package
> (which usually has the same name as the package) to the "uses" clause in
> your project source file. The latter may not happen if an option is set
> in the package itself.

I'm not using this option, as we don't need to add all units at the project.

> The result is that the package files get linked into your project.
> However, if you make the top level .pas file find a conditional
> reference from the uses clause then the package files only get linked in
> when the conditional is true.

Once the user set some defined (-dNOSYNDBZEOS), the conditional will
be always true.
I don't have issues compiling the Package. I can set add/remove the
defined and it gets the dependency paths or remove them.
Everything works, but only in Package context.

> Of course you also must do the same for any other units from the package
> that you include in your own unit files i.e. make their use conditional
> as well.

I don't get this part. I'm not including units, but paths:

if undefined(NOSYNDBZEOS) then
begin
  UnitPath += 
';$PkgOutDir(zcore);$PkgOutDir(zdbc);$PkgOutDir(zparsesql);$PkgOutDir(zplain)';
  IncPath += ';$PkgDir(zcore)\..\..\src';
end;

And these paths do not have the sources (.pas), only the .ppu files.

If use like this and click on Show Options on the Project, I can see
correct paths to use.
if I remove this conditional and add `zcomponent`, which has all these
paths, into my package and click on Show Options on the Project,
again, I can see the *same* paths.

So, I'm thinking this is something on Lazarus context, before sending
to compiler, as the paths looks Ok.

regards,
Marcos Douglas
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Adding Required Packages paths... dynamically

2019-07-19 Thread Marcos Douglas B. Santos via lazarus
Maybe adding "dynamically" the Required Package, rather using
"dynamically paths" by Conditionals, could fix this?
But how to do this?

Just to be more clear, I don't have any "Duplicate units" as compiler is saying!
Thanks.

regards,
Marcos Douglas
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Adding Required Packages paths... dynamically

2019-07-18 Thread Marcos Douglas B. Santos via lazarus
Hi,

Imagine a package that has a dependency for another one. However, this
dependency has a conditional to exists. So, I cannot add the Required
Package by default — I'm talking about ZeosLib.

Then, I used Conditionals (script) for adding ZeosLib paths (-Fu, -Fi)
into the paths of the package — amazing work in IDE, by the way.

In Custom Options | Conditionals, I have something like this:
===begin===
if undefined(NOSYNDBZEOS) then
begin
  UnitPath += 
';$PkgOutDir(zcore);$PkgOutDir(zdbc);$PkgOutDir(zparsesql);$PkgOutDir(zplain)';
  IncPath += ';$(ProjOutDir);$PkgDir(zcore)\..\..\src';
end;
===end===

And it works. If user add the package into a project, he/she could
compile with/without support to ZeosLib, just checking/unchecking some
definition into Defines button. Excellent.

However, my only problem occur if user add zcomponent package, which
belongs to ZeosLib. If so, I get some hints like this:
```
Note: Duplicate unit "ZVariant" in "mormot_base 1.18", orphaned ppu
"\zeos\packages\lazarus\lib\zcore\x86_64-win64\ZVariant.ppu"
Note: Duplicate unit "ZVariant" in "zcore 7.2.5",
ppu="\zeos\packages\lazarus\lib\zcore\x86_64-win64\ZVariant.ppu",
source="\zeos\src\core\ZVariant.pas"
Note: Duplicate unit "ZVariables" in "mormot_base 1.18", orphaned ppu
"\zeos\packages\lazarus\lib\zcore\x86_64-win64\ZVariables.ppu"
Note: Duplicate unit "ZVariables" in "zcore 7.2.5",
ppu="\zeos\packages\lazarus\lib\zcore\x86_64-win64\ZVariables.ppu",
source="\zeos\src\core\ZVariables.pas"
```

What I don't understand is:
Adding ZeosLib into mormot_base package as a dependency (just for
testing), I have the same paths as using Conditionals. Then, why the
compiler show me these hints when I'm using ZeosLib paths
"dynamically" by Conditionals?
What should I do to remove them?

best regards,
Marcos Douglas
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Image Shop, a tool for students learning to program

2019-05-02 Thread Marcos Douglas B. Santos via lazarus
On Wed, May 1, 2019 at 10:21 PM Anthony Walter via lazarus
 wrote:
>
> I wanted to follow up on a concept OI ran past everyone last Friday.
>
> Here is the final product of a tool I created to encourage programming 
> students to learn programming in a fun way.
>
> The tool called Image Shop, allows users to drop image manipulation functions 
> on a design surface. They can wire up and organize their function to create 
> new and different effects. They can also rebuild the program with more 
> functions to create new and interesting image effects.
>
> An overview and video with links to sources and binaries is available here:
>
> https://www.getlazarus.org/learn/tutorials/examples/imageshop/

Very impressive!
SN: there is a typo on README: "...functions using the Free Pascal
langauge..." << "language"

regards,
Marcos Douglas
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Bug when using frames

2019-04-15 Thread Marcos Douglas B. Santos via lazarus
On Mon, Apr 15, 2019 at 5:06 AM Ondrej Pokorny via lazarus
 wrote:
> ...
> I rather create all my frames in runtime, which I also did in Delphi.
> Even Delphi lost properties/events (set event handlers to nil) of
> controls in frames quite frequently.

+1
Much better create them, docking on a panel, in runtime only.

Marcos Douglas
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Cross compile for Linux x64 on Windows 7 x64?

2019-04-02 Thread Marcos Douglas B. Santos via lazarus
On Tue, Apr 2, 2019 at 11:23 AM Bo Berglund via lazarus
 wrote:
>
> On Tue, 2 Apr 2019 09:26:20 -0300, "Marcos Douglas B. Santos via
> lazarus"  wrote:
>
> >The fastest and easy way to setup the cross-compilation - and install
> >Lazarus itself - is using fpcupdeluxe
> >-> https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases
> >
> >Just get the binary for your platform, run and following the
> >instructions. That's all.
>
> I don't want to scrap my existing installation of Lazarus 2.0.0/fpc
> 3.0.4 created by the official download on the www.lazarus-ide.org
> page..
>
> It is configured and I have used it for several projects already

I would say that you just basically need to:
- install a new one
- rewrite your setup files (.xml) at the fpcup default directory
- build Lazarus again to install components that you might have in
your current IDE

That is pretty almost everything.

However, feel free to setup it manually.

regards,
Marcos Douglas
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Cross compile for Linux x64 on Windows 7 x64?

2019-04-02 Thread Marcos Douglas B. Santos via lazarus
On Tue, Apr 2, 2019 at 9:14 AM Bo Berglund via lazarus
 wrote:
>
> I have a command line utility created in Lazarus 2.0.0/fpc 3.0.4 on
> Windows 7 x64. I use the Lazarus/fpc downloaded via this page:
> https://www.lazarus-ide.org/index.php?page=downloads
>
> Now I want to compile this project for Linux on the same x64 Intel CPU
> so I can run it under Ubuntu 16.4 LTS Server x64.
> Since that is a headless machine (it is a server) I need to build the
> utility by cross-compile on my Windows x64 Lazarus installation.
>
> Is there a *simple* instruction on how to do this? I have looked at
> the doc page:
> http://wiki.lazarus.freepascal.org/Cross_compiling
> but it is too complex for me to understand. I tried to just go to the
> sections I deemed relevant to my simple (and probably very common)
> case but they all cross-reference into a maze...
>
> I need a "For Dummies" how-to which presupposes I have installed
> Lazarus/Fpc for Windows x64 and then tells me what to download extra
> (and from where) and also how to set up the project environment to
> make the Linux target.
> Is something like that available?

The fastest and easy way to setup the cross-compilation - and install
Lazarus itself - is using fpcupdeluxe
-> https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases

Just get the binary for your platform, run and following the
instructions. That's all.

best regards,
Marcos Douglas
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] VirtualTreeView rendering on Cocoa

2019-03-25 Thread Marcos Douglas B. Santos via lazarus
On Wed, Mar 13, 2019 at 11:27 AM Andrea Mauri via lazarus
 wrote:
>
> DoubleBuffered, True or False does not have any effect.

Hi Andrea,
Have you posted this bug on bugtracker?
Any news about it?

best regards,
Marcos Douglas
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] inherited in autocode

2019-01-12 Thread Marcos Douglas B. Santos via lazarus
On Sat, Jan 12, 2019 at 8:45 PM Martin Frb via lazarus
 wrote:
>
> On 12/01/2019 22:54, Martok via lazarus wrote:
> > Am 12.01.2019 um 22:28 schrieb Martin Frb via lazarus:
> >> Same for constructors, if the parent constructor changes its argument
> >> list, it will no longer be called.
> > It does generate code, but it calls *any* inherited constructor that 
> > matches the
> > signature:
> >
> >type
> >  TA = class
> >constructor Create(extra:Boolean);
> >  end;
> >  TB = class(TA)
> >constructor Create;
> >  end;
> >
> >constructor TA.Create(extra: Boolean);
> >begin
> >  inherited Create;
> >  WriteLn('TA.Create');
> >end;
> >constructor TB.Create;
> >begin
> >  inherited;   // calls TObject.Create!
> because TObject has a matching constructor.
>
> Imagine it was
>
> constructor TB.Create(extra: integer);
>
> but was changed it TA.

IMHO, `inherited;` and `inherited Create;` should be the same behavior.
I don't use just `inherited;` and it isn't an issue for me, but it
looks like an inconsistency on the language.

Using the example, both constructors _must_ call TObject.Create
because `TA` haven't used `reintroduce` for the constructor.

Marcos Douglas
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] In windows 10 (64bit) Assigning TFrame.parent to a TForm took 10 more seconds than Windows 7 (64 bit)

2018-12-18 Thread Marcos Douglas B. Santos via lazarus
On Tue, Dec 18, 2018 at 2:16 PM Dennis via lazarus
 wrote:
>
> I am using FPC 3.1.1  + Lazarus 1.9.0 running on windows 10 (64 bit) to 
> generate windows exe of 64 bit.
>
> I logged the timestamps before and after parent assignment in my 
> constructor TMyFrame.CreateWith(aForm : TForm);
> 
> MyFrame.Parent := aForm (where aForm is the main application window).
> ..
>
>
> In windows 10 (64 bit)
> 18-12-19 00:06:10.154 Before Set parent( old parent = nil )
> 18-12-19 00:06:23.983 After Set parent
>
> it took 13.9 seconds
>
> In windows 7 (64 bit)
>
> 18-12-19 00:07:45.916 Before Set parent( old parent = nil )
> 18-12-19 00:07:48.939 After Set parent
> it only took 3 seconds.
>
> what could possibly be the cause of the extra 10 seconds in windows 10 ?
>
> The hardware is same. In fact, the windows 7 (64 bit) is a virtualbox running 
> on the windows 10, so it should be slower.

Maybe a simple - but complete - example on code can help.
I've been using "dynamics frames" since WinXP (maybe before) and I
haven't seen any penalty (like 10 seconds) of time among those
versions.

best regards,
Marcos Douglas
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] TListView + OwnerData=true + CheckBoxes

2018-12-11 Thread Marcos Douglas B. Santos via lazarus
On Tue, Dec 11, 2018 at 10:06 AM zeljko  wrote:
>
> On 12/11/2018 12:44 PM, Marcos Douglas B. Santos wrote:
> > On Tue, Dec 11, 2018 at 5:40 AM zeljko  wrote:
> >>
> >> On 12/10/2018 08:38 PM, Marcos Douglas B. Santos via lazarus wrote:
> >>
> >>> I don't know what Themes is.
> >>> I want to use just default components.
> >>>
> >>> ...and nobody more answered.
> >>> Is everybody using TDBGrid to show their data?  :)
> >>
> >> No. Use TVirtualStringTree instead of TListView, it's x10 faster.
> >
> > Do you mean this https://github.com/blikblum/VirtualTreeView-Lazarus ?
>
> I'm using an older implementation (v.4.8) of VirtualTrees, and yes, I've
> checkouted it from blikblum page.
> Online Package Manager (OPM) for lazarus installs TVirtualStringTree by
> default , so you already have it in lazarus if you're using trunk or
> 2.0RCxx (2.0 fixes).

I've searched by TVirtualStringTree  on
http://packages.lazarus-ide.org/ and haven't found.
My ENV is Lazarus 1.9.0 r58537 FPC 3.1.1 i386-win32-win32/win64
I have several IDE versions but, for that project I cannot update my
ENV cause other developers are using the same version above.

But, about TVirtualStringTree, is it easy to do what I need, ie, using
virtual data (as records) with checkboxes showing automagically?

best regards,
Marcos Douglas

PS: sorry, I have sent the previous email just for you.
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] TListView + OwnerData=true + CheckBoxes

2018-12-10 Thread Marcos Douglas B. Santos via lazarus
On Sun, Dec 9, 2018 at 12:01 PM zeljko  wrote:
>
> On 12/09/2018 12:58 PM, Marcos Douglas B. Santos via lazarus wrote:
> > Hi,
> > Has anybody already used, with success, virtual ListView showing CheckBoxes?
> >
> > There are any links on Internet, most about Delphi, but each one say
> > something little different then other.
> > I've tried a few combinations reading those links with no success. I
> > haven't tried any that says that we need to paint the checkboxes with
> > complex algorithms because I think that it should be simpler.
>
> If you use Themes for checkboxes it's pretty easy. Never used virtual
> TListView with checkboxes so don't know it's behaviour

I don't know what Themes is.
I want to use just default components.

...and nobody more answered.
Is everybody using TDBGrid to show their data?  :)

regards,
Marcos Douglas
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Bug on CodeTools to find unit using in `../path/unit.pas`

2018-12-10 Thread Marcos Douglas B. Santos via lazarus
On Mon, Dec 10, 2018 at 6:39 AM Mattias Gaertner via lazarus
 wrote:
>
> On Sun, 9 Dec 2018 22:33:47 -0200
> "Marcos Douglas B. Santos via lazarus" 
> wrote:
>
> >[...]
> > unit A;
> > uses msg1 in 'msg/msg.pas'
> > -
> > unit B;
> > uses msg2 in 'msg/msg.pas'
> >
> > As I understood, when the compiler knows about `msg.pas`, it will use
> > the first identifier that appeared, which is `msg1`. And that is a
> > problem. Why?
>
> For better chance of getting an answer you can ask the fpc
> developers on the fpc list.
>
> Note that the 'in' feature came from Delphi, where it is used to mark
> which unit belongs to the project/package. And in Delphi the unitname
> must match.

Indeed, you're right. I've tested and it doesn't work, at least on Delphi 7.

> FPC extended it to allow alias, but afaik it is hardly used.
>

It could be a great feature for both compilers, IMHO.

> >[...]
> > And I've discovered another issue on IDE:
> > If I use like above `foo in 'path/Some.Long.Name.Unit.pas';`, IDE will
> > save on XML project files the unit as `Some.Long.Name.Unit`, when it
> > should be `foo` as the name of the unit.
>
> That is the cached name of the unit name from its source, not some
> alias name. The IDE does not yet support alias names. Only a few
> functions support the 'in' alias.

I got it, thanks.

Marcos Douglas
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Bug on CodeTools to find unit using in `../path/unit.pas`

2018-12-09 Thread Marcos Douglas B. Santos via lazarus
On Sun, Dec 9, 2018 at 12:59 PM Juha Manninen via lazarus
 wrote:
>
> On Sun, Dec 9, 2018 at 2:06 PM Marcos Douglas B. Santos via lazarus
>  wrote:
> > Instead, can I add it on Search Path but using a macro or custom
> > definition, to get the path accordingly to Build Mode choose?
>
> Why?
> The "Other unit files (-Fu)" setting is part of Build Modes. You can
> set a different path for each Build Mode.

Indeed. I've answered quickly without thinking properly. Sorry.

However, this do not solve "my problem", which is not use Search Paths.
Why? I'll try to explain:
When I realized that I can use paths in uses clauses I thought that I
could use `alias for units`, which is better than "namespaces", IMHO.

So, using my example before, I could do that:
uses
  `MyMsg in 'msg/msg.pas'`;

I just choose a new name for the file `msg.pas`, which is `MyMsg`.
It compiles. I can use it as a prefix, eg., `MyMsg.AFunction()`, and
it is great.
But if you put the `msg` folder in Search Path, the compiler will use
the same file name as the unit, ie, the identifier will be the same:
Msg.
Then I thought: If I "register" the name what I want for `msg.pas` on
project (lpr), the compiler will use it in all code. However, as I've
explained before, it doesn't work on IDE, having some issues on
CodeTools.
Then I thought: I could use the path on each uses clause, no problem.
If I need to change some path, I could just do a replace in all files
- no big deal. But, I discovered that I cannot use different `alias`
pointing to the same file, because there are some issues about classes
and interfaces.
For example:
unit A;
uses msg1 in 'msg/msg.pas'
-
unit B;
uses msg2 in 'msg/msg.pas'

As I understood, when the compiler knows about `msg.pas`, it will use
the first identifier that appeared, which is `msg1`. And that is a
problem. Why?
Consider that:

unit strings;
type
  TStr = type string;
end;
---
unit b;
uses str in 'abc.strings.pas';
type
  IBar = interface
procedure Exec(const s: TStr);
  end;
end;
---
unit c;
uses abcstr in 'abc.strings.pas';
type
  TBar = interface
procedure Exec(const s: TStr);
  end;
end;

So, units B and C uses A, which has a `TStr` type declared.
The problem here is that `IBar` is using `TStr` as `str.TStr`
implicit; on C unit, `TBar` is using `TStr` as `abcstr.TStr`, and I
have a compiler error.
As I understand, the compiler uses units as prefix for types.

Finally, it turn back us for the original issue: if I can "register"
just one `alias` for an unit on the project (lpr), I could use it on
all code of my project, in theory.
And why this is "important"?
If I have an unit like "Some.Long.Name.Unit", I will could use it like:
  foo in 'path/Some.Long.Name.Unit.pas';

And I've discovered another issue on IDE:
If I use like above `foo in 'path/Some.Long.Name.Unit.pas';`, IDE will
save on XML project files the unit as `Some.Long.Name.Unit`, when it
should be `foo` as the name of the unit.

best regards,
Marcos Douglas
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Bug on CodeTools to find unit using in `../path/unit.pas`

2018-12-09 Thread Marcos Douglas B. Santos via lazarus
On Sat, Dec 8, 2018 at 4:49 PM Mattias Gaertner via lazarus
 wrote:
>
> On Sat, 8 Dec 2018 14:15:20 -0200
> "Marcos Douglas B. Santos via lazarus" 
> wrote:
> [...]
> > You can argue that I just need to include the path on Search Path but,
> > please, don't. I want to use something like "dynamic paths".
>
> Can you add 'msg' to the Project / Compiler Options / Other Sources?

Instead, can I add it on Search Path but using a macro or custom
definition, to get the path accordingly to Build Mode choose?

best regards,
Marcos Douglas
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] TListView + OwnerData=true + CheckBoxes

2018-12-09 Thread Marcos Douglas B. Santos via lazarus
Hi,
Has anybody already used, with success, virtual ListView showing CheckBoxes?

There are any links on Internet, most about Delphi, but each one say
something little different then other.
I've tried a few combinations reading those links with no success. I
haven't tried any that says that we need to paint the checkboxes with
complex algorithms because I think that it should be simpler.

Lazarus 1.9.0 r58537 FPC 3.1.1 i386-win32-win32/win64

best regards,
Marcos Douglas
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Bug on CodeTools to find unit using in `../path/unit.pas`

2018-12-08 Thread Marcos Douglas B. Santos via lazarus
Hi,
I'm playing around with units to include them in a "different" way in a
test program. I realized that there are some issues only on Lazarus IDE
code-completion — no error to compile.

Inside the folder of the project, I've added a new unit in `msg` folder:
`msg/msg.pas`.

If I use this unit on lpr using `in`, like this:
===begin===
program1;
uses
  {...},
  `msg in 'msg/msg.pas'`;
===end===

...I have no issues to compile.
Pay attention that I haven't put `msg` folder on Search Path.

Inside on `msg` unit I have a code for testing:
function MakeString: string;

If uses that unit in any units on that program and try to code-complete
"MakeS*" (Ctrl+SPACE) I got "Error: unit not found: msg" from CodeTools.

Lazarus 1.9.0 r58537 FPC 3.1.1 i386-win32-win32/win64

You can argue that I just need to include the path on Search Path but,
please, don't. I want to use something like "dynamic paths".

Continuing the test, if I use that unit as `msg in 'msg/msg.pas' on the
other units, I got no error from CodeTools:
===begin===
unit Unit1;
// a unit that has a Form, for example
uses
  Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls,
  msg in 'msg/msg.pas';
===end===

Which tells us that CodeTools knows how to read the "in 'path/unit'", but
only if it was declared on the same unit that is using it.

So, I can use the path on all units but as the compiler knows how to
compile if I just put one declaration on the lpr, using the same
indentifier `msg` in all program, I believe the IDE should know how to read
this too.

Am I right?

Best regards,
Marcos Douglas
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] How to build FPC/Lazarus from sources on Windows?

2018-11-08 Thread Marcos Douglas B. Santos via lazarus
On Thu, Nov 8, 2018 at 10:23 AM Bo Berglund via lazarus
 wrote:
>
> On Wed, 7 Nov 2018 18:39:59 -0700 (MST), leledumbo via lazarus
>  wrote:
>
> >> If I want to build the 64 bit version, where should I then put the 64 bit
> >binutils?
> >
> >Wherever -FD in your fpc.cfg points to (remember, fpc.cfg supports
> >conditionals).
> >
> >> The suggested path c:\freepascal\binutils\i386-win32\ seems incorrect.
> >
> >Why not? The binutils itself could still be 32-bit while generating 64-bit
> >binaries. Native 64-bit shouldn't be there, of course.
>
> So in fact I don't really need the 64 bit versions of the binutil
> files?
>
> I looked further down on the page I found and noted this regarding
> creation of the bat file used to build fpc:
>
> For crosscompiler to x86_64 add the following after the first make:
>
> make all OS_TARGET=win64 CPU_TARGET=x86_64 INSTALL_PREFIX=%myFPC%
> PP=%mybinutils%\ppc386.exe DATA2INC=%myFPC%\utils\data2inc.exe
> make crossinstall OS_TARGET=win64 CPU_TARGET=x86_64
> INSTALL_PREFIX=%myFPC% PP=%mybinutils%\ppc386.exe
> DATA2INC=%myFPC%\utils\data2inc.exe
>
> It rather looks like I don't need two different Lazarus installations
> in order to build for both 32 and 64 bit windows, right?
> In that case should I not focus on the 64 bit version and have 32 bit
> as a crosscompile target?
>
> I.e. Use Lazarus 64 bit to sometimes create a 32 bit program through
> cross-compile.
>
> Now I am unsure of what kind of Lazaruses I really do have (4 versions
> at the moment). Is there a simple way to check if lazaus itself is 32
> or 64 bit?
>
> For Lazarus the bat file looks like this:
>
> set myroot=c:\freepascal
> set myFPC=%myroot%\fpc\3.0.4
> set mybinutils=%myroot%\binutils
> set PATH=%mybinutils%\i386-win32;%myFPC%\bin\i386-win32;%PATH%
> cd %myroot%\laz
> make clean all OPT="-glw2 -Xg"
>
> Will it build a 64 or 32 bit version of Lazarus?
> Looks like it uses 32 bit paths...

See here - https://github.com/mdbs99/fp-scripts/blob/master/fpc-make.bat#L54-L58
At least for Windows, you might install i386-win32 version then, if
you want, compile a x86_64 version as explained on script above.

But, again, try fpcupdeluxe... "there is not life without it" :)

regards,
Marcos Douglas
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] How to build FPC/Lazarus from sources on Windows?

2018-11-08 Thread Marcos Douglas B. Santos via lazarus
On Wed, Nov 7, 2018 at 9:23 AM Bo Berglund via lazarus
 wrote:
>
> On Wed, 07 Nov 2018 11:51:36 +0100, Bo Berglund via lazarus
>  wrote:
>
> >Is there an up-to-date page describing the exact procedure to build
> >FPC and Lazarus from sources retrieved via SVN on Windows?
> >
> After posting I found this page:
>
> http://wiki.lazarus.freepascal.org/Installing_Lazarus#Compiling.2Finstalling_FPC_and_Lazarus_from_Sources_of_SVN_.28Win32.29
>
> Maybe this is the definite instruction?
> I will have a look and see if it works out like I need...

I made this page - then others have updated too.
I've been using this script (my own, updated, you can get here[1]) for
many years, however using fpcupdeluxe is much simpler.

[1] https://github.com/mdbs99/fp-scripts

regards,
Marcos Douglas
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] IDE Spotter

2018-09-23 Thread Marcos Douglas B. Santos via Lazarus
On Sun, Sep 23, 2018 at 2:28 PM Michael Van Canneyt via Lazarus
 wrote:
>
> (I guess everyone now guessed, I don't u

I thought that I was the last one not using a docked IDE :)

Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Start Lazarus and press F9 to see a console saying: "Analysing... Coding..."

2018-08-05 Thread Marcos Douglas B. Santos via Lazarus
On Sun, Aug 5, 2018 at 3:40 PM, Marcos Douglas B. Santos  
wrote:
> On Sun, Aug 5, 2018 at 12:33 PM, John Landmesser via Lazarus
>  wrote:
>> .. works ok with:
>>
>> Lazarus 1.9.0 r58509 FPC 3.0.4 x86_64-linux-gtk2
>
> Yes, the same here, but using Windows.
> It looks like something was broken between these revisions.

After clean all, I couldn't compile using FPC 3.1.1, only with 3.0.4.

regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Start Lazarus and press F9 to see a console saying: "Analysing... Coding..."

2018-08-05 Thread Marcos Douglas B. Santos via Lazarus
On Sun, Aug 5, 2018 at 12:33 PM, John Landmesser via Lazarus
 wrote:
> .. works ok with:
>
> Lazarus 1.9.0 r58509 FPC 3.0.4 x86_64-linux-gtk2

Yes, the same here, but using Windows.
It looks like something was broken between these revisions.

regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Start Lazarus and press F9 to see a console saying: "Analysing... Coding..."

2018-08-05 Thread Marcos Douglas B. Santos via Lazarus
I've updated my Lazarus and now I cannot start any GUI application.
Th IDE shows a console saying "Analysing... Coding...".

To reproduce, just start Lazarus and press F9.

Lazarus 1.9.0 r58680M FPC 3.1.1 i386-win32-win32/win64

regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Indy vs Synopse: POP3

2018-07-30 Thread Marcos Douglas B. Santos via Lazarus
On Mon, Jul 30, 2018 at 9:10 AM, Bo Berglund via Lazarus
 wrote:
>
> On Sun, 29 Jul 2018 09:27:17 -0300, "Marcos Douglas B. Santos via
> Lazarus"  wrote:
>
> >I haven't use Indy for years, but I've installed the version 10 in Lazarus
> >1.9 (trunk) using FPC 3.1.1.
>
> How did you install it?
> Did you use the Package/OnLinePackageManager to get it thus ensuring
> the most recent and working version of Indy?

I've got from trunk, manually installed.

> Regarding GMail, I have used Indy10 to read mail on Gmail via Pop3,
> but you need to use the encrypted connection just like if you would
> connect to GMail from for example Thunderbird.
> The SSL handlers are available as open source and integrated with
> Indy. Works fine.

Do you use SASLMechanism ?
Could you send an example, please? You can send to my inbox if this
kind of subject bother you on that list too.

> As Graeme has already suggested you should use the Indy specific forum
> for questions regarding Indy in Delphi and FPC environments:
>
> https://www.atozed.com/forums/forumdisplay.php?fid=9

Thanks for the link.

regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Indy vs Synopse: POP3

2018-07-29 Thread Marcos Douglas B. Santos via Lazarus
I need to read e-mails in a few accounts using POP3.
I haven't use Indy for years, but I've installed the version 10 in Lazarus
1.9 (trunk) using FPC 3.1.1.
It seems that things changed like SASLMechanism, which does't work when I
click in the button to open the editor, showing me this error:
TGlyphBitmap: Unsupported Resourcetype: XPM Resource Name: DIS_ARROWRIGHT

But maybe this property can be set directly to the code... anyway.

Do you have a simple demo (I haven't found any about it) that show how
connect in a Google account, using POP3?
Is there any dependencies as dlls?

As Indy looks like has a "new mechanism" to authentication, I'm thinking if
Synopse still work for that job. If Indy has no dependencies, I would like
to use it. I believe Synopse has SSL dependencies... I don't know.

Have you already compare both frameworks? Wich one should I choose for this
job?

best regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] IDE option: Convert selection to string ?

2018-07-12 Thread Marcos Douglas B. Santos via Lazarus
On Thu, Jul 12, 2018 at 9:19 AM, Michael Van Canneyt via Lazarus
 wrote:
>
> I cannot imagine I am the only one with this need :)

+1
Of course you're not alone!

Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Different paths, different computers, and one project

2018-07-07 Thread Marcos Douglas B. Santos via Lazarus
On Sat, Jul 7, 2018 at 11:52 PM, Marcos Douglas B. Santos
 wrote:
> Imagine a project that works only with set of unit paths (-Fu), not packages.
> The issue is that a computer could have a different path for a lib,
> comparing to another one.
>
> I've removed the paths from the project (.lpi) and added an
> `@extrafpc.cfg` with `-Fu` and `-Fl` paths. I can compile the project,
> but the code-completion doesn't work because the IDE can't find the
> units.
> I can't also use `Other sources` option cause it will have the same
> problem using `-Fu` and hard-coded paths.
>
> How to configure the paths?

I've used the $Env(name) and it worked.
The $Env is the best option in that case?
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Searchable docs online

2018-07-05 Thread Marcos Douglas B. Santos via Lazarus
On Thu, Jul 5, 2018 at 2:47 PM, Michael Van Canneyt via Lazarus
 wrote:
>
>
> On Thu, 5 Jul 2018, Marcos Douglas B. Santos via Lazarus wrote:
>
>> On Thu, Jul 5, 2018 at 10:50 AM, Michael Van Canneyt via Lazarus
>>  wrote:
>>>
>>>
>>>
>>> Feedback and comments welcome.
>>
>>
>> There is no `action` in the search form. Nothing happens...
>
>
> Of course there is no action. The Javascript catches the 'OnClick' and
> executes the request in the
> background.

I know that... but was not working. I've tried a few times and nothing happened.
Now, it works.

Regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Searchable docs online

2018-07-05 Thread Marcos Douglas B. Santos via Lazarus
On Thu, Jul 5, 2018 at 10:50 AM, Michael Van Canneyt via Lazarus
 wrote:
>
>
> Feedback and comments welcome.

There is no `action` in the search form. Nothing happens...

Regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Unittesting and find memleaks

2018-06-29 Thread Marcos Douglas B. Santos via Lazarus
On Fri, Jun 29, 2018 at 3:21 AM, Andreas Frieß via Lazarus
 wrote:
> Is it possible to make a heaptrace for a (one) testcase (FPCUnit) only ? Or
> is there an other good way to test code for memleaks ?

You can run just this testcase... but for me this doesn't make sense.

Regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] CGI Application do not enable Run (F9) button

2018-06-04 Thread Marcos Douglas B. Santos via Lazarus
On Mon, Jun 4, 2018 at 10:15 AM, Mattias Gaertner via Lazarus
 wrote:
> On Mon, 4 Jun 2018 10:03:06 -0300
> "Marcos Douglas B. Santos via Lazarus" 
> wrote:
>
>>[...]
>> >> I've just clicked in New>CGI Application to create a new project and the
>> >> Run(F9) button is disabled.
>>[...]
>> I'm still curious: how disable the button in IDE?
>
> You can disable
> Project / Project Options / Miscellaneous / Project is
> runnable.

That's it. Thank you.

Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] CGI Application do not enable Run (F9) button

2018-06-04 Thread Marcos Douglas B. Santos via Lazarus
On Mon, Jun 4, 2018 at 2:54 AM, Michael Van Canneyt via Lazarus
 wrote:
>
>
> On Sun, 3 Jun 2018, Marcos Douglas B. Santos via Lazarus wrote:
>
>> I've just clicked in New>CGI Application to create a new project and the
>> Run(F9) button is disabled.
>> However, If I choose FastCGI instead, the button stay enabled.
>>
>> Is this a bug or a kind of restriction?
>
>
> You cannot run a CGI program in the IDE. It expects a server environment.
> If you attempt to run it in the IDE, you'll get an error 'no REQUEST_METHOD
> passed from server' or something like it.

Hey Michael, thanks. But my intention was to code an example showing
how we can change between CGI and Standalone using directives.
I've used FastCGI choice instead.

I'm still curious: how disable the button in IDE?

Best regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] CGI Application do not enable Run (F9) button

2018-06-03 Thread Marcos Douglas B. Santos via Lazarus
I've just clicked in New>CGI Application to create a new project and the
Run(F9) button is disabled.
However, If I choose FastCGI instead, the button stay enabled.

Is this a bug or a kind of restriction?

Best regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Comparing strings case-insensitive and ignoring accents

2018-05-20 Thread Marcos Douglas B. Santos via Lazarus
On Sun, May 20, 2018 at 2:39 PM, Marc Weustink via Lazarus
<lazarus@lists.lazarus-ide.org> wrote:
>
>
>
> On May 20, 2018 4:06:42 AM GMT+02:00, "Marcos Douglas B. Santos via Lazarus" 
> <lazarus@lists.lazarus-ide.org> wrote:
> >Hi,
> >
> >Is there any (fast) built-in function in RTL or LCL that compare two
> >strings using case-insensitive and ignoring accents?
> >
> >These strings are UTF-8.
>
> For comparing case insensitive strings you can use SameText(). Don't know if 
> there is a function to strip accents.

Hey Marc.
I know about SameText that calls CompareText, but I need to combine
with other one that strip accents.
I can make it, but I prefer use built-in functions for do not have
issues about encode, etc.

Thanks, anyway.

Regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Changes to fpWeb...

2018-05-02 Thread Marcos Douglas B. Santos via Lazarus
On Wed, May 2, 2018 at 3:21 AM, Michael Van Canneyt via Lazarus
<lazarus@lists.lazarus-ide.org> wrote:
>
>
> On Tue, 1 May 2018, Marcos Douglas B. Santos via Lazarus wrote:
>
>>> but I would appreciate
>>> feedback if you have cases where your datamodules no longer behave as
>>> they
>>> used to (both with LegacyRouting=true or false)
>>>
>>> Some more improvements to fpweb are planned, but they will not be as
>>> invasive as this.
>>
>>
>>
>> Hello Michael,
>>
>> Is there a documentation link to explain all new features?
>> I'm gonna start a new web project and I would like to use them.
>
>
> I will see if I can put something in the wiki.
>
>>
>> What about the design packages for Lazarus?
>> The wizards continue creating Web Module based applications.
>
>
> A good point. I had not thought of this. I will put it on my todo list.

OK, thank you.

Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Changes to fpWeb...

2018-05-01 Thread Marcos Douglas B. Santos via Lazarus
On Tue, May 1, 2018 at 9:59 PM, Marcos Douglas B. Santos  
wrote:
> Hello Michael,
>
> Is there a documentation link to explain all new features?
> I'm gonna start a new web project and I would like to use them.
>
> What about the design packages for Lazarus?
> The wizards continue creating Web Module based applications.
>
> This is my environment:
> Lazarus 1.8.3 r57764 FPC 3.0.4 i386-win32-win32/win64

Actually, I've found the "routing example" and it worked very well in
standalone mode in my environment.
I can get how it works (the new way) just studying this demo. Thank you.
But I still think that we need to have a good documentation for it.

Regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Changes to fpWeb...

2018-05-01 Thread Marcos Douglas B. Santos via Lazarus
On Fri, Jan 13, 2017 at 7:36 PM, Michael Van Canneyt via Lazarus <
lazarus@lists.lazarus-ide.org> wrote:

>
> Hello,
>
> I have committed a serious change to the way fpweb handles requests.
>
> Especially routing of requests was changed.
>
> The old Delphi style routing worked with Datamodules only. The pattern was
> strictly /modulename/actionname or through query variables:
> ?module=xyz=nmo
>
> This old routing is still available by setting the LegacyRouting property
> of
> webhandler or webapplication (custweb) to true. (the new routing described
> below is then disabled)
>
> The new routing is more flexible in 3 ways.
>
> - It is no longer required to use datamodules, but this is still supported.
>   There are now 4 methods that can be used to register a route:
>
>   - Using a callback procedure
> TRouteCallback = Procedure(ARequest: TRequest; AResponse);
>
>   - Using a callback event:
> TRouteEvent = Procedure(ARequest: TRequest; AResponse) of object;
>
>   - Using an interface
> IRouteInterface = Interface ['{10115353-10BA-4B00-FDA5-80B69AC4CAD0}']
>   Procedure HandleRequest(ARequest : TRequest; AResponse : TResponse);
> end;
> Note that this is a CORBA interface, so no reference counting.
> (although a reference counting version could be added, if desired)
>
>   - Using a router object:
> TRouteObject = Class(TObject,IRouteInterface)
> Public
>   Procedure HandleRequest(ARequest : TRequest; AResponse : TResponse);
> virtual; abstract;
> end;
> TRouteObjectClass = Class of TRouteObject;
>
> The object class needs to be registered. The router will instantiate
> the
>object and release it once the request was handled.
>
>   - Using a datamodule, as it used to be.
>
>   More methods can be added, if need be.
>   All routes are registered using the HTTPRouter.RegisterRoute method.
>   it is overloaded to accept any of the above parameters.
>
> - The router can now match more complex, parametrized routes.
>
>   A route is determined by the path part of an URL; query parameters are
> not examined.
>
>   /path1/path2/path3/path4
>
>   In these paths, parameters and wildcards are recognized:
>
>   :param means that it will match any request with a single part in this
> location
>   *param means that it will match any request with zero or more path parts
> in this location
>
>   examples:
>
>   /path1
>   /REST/:Resource/:ID
>   /REST/:Resource
>   /*/something
>   /*path/somethiingelse
>   /*path
>
>   The parameters will be added to TRequest, they are available in the
> (new) RouteParams array property of TRequest.
>
>   Paths are matched case sensitively by default, and the first matching
> pattern is used.
>
>   The HTTP Modules are registered in the router using classname/* or
> defaultmodulename/*
>
> - A set of methods can be added to the route registration (default is to
> accept all methods).
>   The router will  match the request method. If the method does not match,
> it will raise an
>   exception which will result in a 405 HTTP error.
>
> I have added a demo application. It behaves well, just as the testcases,
> but I would appreciate
> feedback if you have cases where your datamodules no longer behave as they
> used to (both with LegacyRouting=true or false)
>
> Some more improvements to fpweb are planned, but they will not be as
> invasive as this.


Hello Michael,

Is there a documentation link to explain all new features?
I'm gonna start a new web project and I would like to use them.

What about the design packages for Lazarus?
The wizards continue creating Web Module based applications.

This is my environment:
Lazarus 1.8.3 r57764 FPC 3.0.4 i386-win32-win32/win64

Best regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] External/out-of-tree LCL widgetset

2017-12-02 Thread Marcos Douglas B. Santos via Lazarus
On Fri, Dec 1, 2017 at 5:43 PM, Graeme Geldenhuys via Lazarus
<lazarus@lists.lazarus-ide.org> wrote:
> On 2017-12-01 13:33, Marcos Douglas B. Santos via Lazarus wrote:
>>
>> I believe RAD is the best way to code a GUI
>
>
> I'll even disagree with that - somewhat. :)
>
>http://geldenhuys.co.uk/articles/model-gui-mediator.pdf
>
> With Model-GUI-Mediator (think MVC or MVP design patterns but for modern GUI
> toolkits) you use RAD style to drop components on a form, but you DON'T hook
> into any events or Dataset properties using the form designer. Also, you
> DON'T use data-aware controls.

I am aware of MVC, MVP, MVVM, and now MGM.
I agree with you but, they represent almost the same thing.

> Instead you use Mediators - a very thin layer of non-gui code (reusable and
> only implemented once) that links widgets and business objects.
> Bi-directional updates occur automatically via the Objserver design pattern.
> MGM was the reason FPC now has Observers built into classes like TStringList
> etc.

Unfortunately, it was implemented in a wrong way, using classes
instead of interfaces instances.

> The MGM implementation I described in the article is very basic - to get the
> idea across much easier. The MGM implementation inside tiOPF is *much* more
> advanced and improved - requiring *much* less boiler-plate coding too.
>
> MGM also allows you to switch your application from LCL to fpGUI to VCL in a
> blink of an eye. The mediators for all these toolkits are already written -
> so nothing new to implement. Switching a form design from using a TListView
> to TStringGrid (or vice-versa) is also a 2 second job.

That is interesting.

> Creating mediators for new componentsFor example TChart ora DevExpress
> QuantumGrid is a 5 minute job at most. So suddenly you can use any of the
> free or paid for components - not just db-aware components.
>
> I've used MGM in multiple commercial projects for about 6 years now - it
> works brilliantly. You UI form units are almost empty, and good separation
> of UI, business rules and persistence. Plus I can use OOP and real "objects"
> in my code, not SQL queries and TField instances.

I think you misunderstand me. I said "RAD is the best way to code a
GUI", the visual part, not the business rules.
I don't use db-aware — well only TDBGrid just to show data — and I
don't have any business rules using TFields, Before|After Post, etc.

Best regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] External/out-of-tree LCL widgetset

2017-12-01 Thread Marcos Douglas B. Santos via Lazarus
On Fri, Dec 1, 2017 at 6:49 AM, Giuliano Colla via Lazarus
 wrote:
>
> I don't believe you can give a general rule. The tool must be appropriate
> for the application. The word "programming" includes an universe of non
> compatible things. Something like "mechanical design". Designing a watch is
> something completing different than designing a monorail train.
>
> We used Delphi, and now use Lazarus to design the human interface for
> automatic machines, where the visual part is the most important one. The RAD
> approach is the most efficient and productive. But when we had to interface
> the production data generated with company database, it turned out that one
> had to write a lot of non-visual code, and we found that RAD approach would
> just have confused things, leading to unreadable and inefficient code.

I believe RAD is the best way to code a GUI, but not to write the
business rules.
As you said, "...RAD approach would just have confused things, leading to
unreadable and inefficient code".

Best regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] External/out-of-tree LCL widgetset

2017-12-01 Thread Marcos Douglas B. Santos via Lazarus
On Fri, Dec 1, 2017 at 5:22 AM, Martin Schreiber via Lazarus
 wrote:
> On Friday 01 December 2017 08:01:06 Graeme Geldenhuys via Lazarus wrote:
>> On 2017-12-01 06:42, Martin Schreiber via Lazarus wrote:
>> > That is your opinion, my opinion is that RAD is the most productive
>> > development technology for most of the projects if done right,
>>
>> And your last 3 words is the most important part - "if done right". In
>> my 20+ years of using Delphi, I can count of one hand how many company
>> products I've seen "done right" using the RAD style approach. And I've
>> worked at plenty of companies in that 20+ years. It seems "if done
>> right" is a near impossibility for most Delphi developers.
>>
> For me Delphi is not the best RAD environment and therefore developments made
> with Delphi should not be used to disqualify RAD as a whole.

I agree Delphi, nowadays, is not the best RAD environment.

Best,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] External/out-of-tree LCL widgetset

2017-12-01 Thread Marcos Douglas B. Santos via Lazarus
On Fri, Dec 1, 2017 at 5:01 AM, Graeme Geldenhuys via Lazarus
 wrote:
> On 2017-12-01 06:42, Martin Schreiber via Lazarus wrote:
>>
>> That is your opinion, my opinion is that RAD is the most productive
>> development technology for most of the projects if done right,
>
>
> And your last 3 words is the most important part - "if done right". In my
> 20+ years of using Delphi, I can count of one hand how many company products
> I've seen "done right" using the RAD style approach. And I've worked at
> plenty of companies in that 20+ years. It seems "if done right" is a near
> impossibility for most Delphi developers.

I had the same experience working in some companies.

> So I'm not saying its impossible, just very very unlikely. Using non-RAD
> approaches seems to guide the developer in better design, but yes, they
> could still screw that up too (without leadership guidance).

+1
I agree.

Best,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Compiling/linking/debugging package with generics

2017-11-28 Thread Marcos Douglas B. Santos via Lazarus
On Tue, Nov 28, 2017 at 8:50 AM, Mattias Gaertner via Lazarus
<lazarus@lists.lazarus-ide.org> wrote:
> On Tue, 28 Nov 2017 08:41:05 -0200
> "Marcos Douglas B. Santos via Lazarus" <lazarus@lists.lazarus-ide.org>
> wrote:
>
>>[...]
>> > Are your 'Other unit files (-Fu)' paths in project inspector and
>> > your package empty?
>>
>> And is this correct, package empty?
>
> It is normal.

Ok... but is there some "advantages" adding files in the package?
If there is not, why do we have this option?

Thanks,

Best regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Compiling/linking/debugging package with generics

2017-11-28 Thread Marcos Douglas B. Santos via Lazarus
On Mon, Nov 27, 2017 at 4:41 PM, Mattias Gaertner via Lazarus
 wrote:
> On Mon, 27 Nov 2017 13:33:13 -0500
> Donald Ziesig via Lazarus  wrote:
>
>>[...]
>> > When you change a pas file of your package and you compile your project,
>> > does the IDE automatically compile your package?
>> Yes (at least it catches typos).  Also, the same problem occurs when I
>> compile the package manually, then run the program without using
>> "cleanup and build".  (I am gradually discovering the extent of the
>> problem ;-)).
>
> Are your 'Other unit files (-Fu)' paths in project inspector and
> your package empty?

And is this correct, package empty?

Best regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Who is using Object Pascal in production?

2017-11-27 Thread Marcos Douglas B. Santos via Lazarus
On Mon, Nov 27, 2017 at 4:54 PM, Alexsander Rosa via Lazarus
 wrote:
>
> Our ERP (version 3) was written in Lazarus + PostgreSQL.
>

Is it desktop or web?

Best regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Who is using Object Pascal in production?

2017-10-30 Thread Marcos Douglas B. Santos via Lazarus
On Mon, Oct 30, 2017 at 1:47 AM, Dennis via Lazarus
 wrote:
>>
> I use FPC/Lazarus to write a program trading software to trade
> futures/options. I chose it because I need it to run on windows and (maybe
> in future) Linux and Mac OS.
> Could not use Java,C# because garbage collection and JIT compiler might
> cause the program to freeze in the middle of critical trading, which is
> utterly unacceptable for trading.

Some people say the same about garbage collection, but others don't.
They tell the code could be wrong.
But I agree with you.

> FPC is also clean and easy to maintain and can actually do anything. I might
> lack some new syntax to speed up parallel programming or functional
> programming but those could still be achieved with a bit work.
>
> I don't want to invest in a new language just for a few new features but
> risk making some programming errors since I don't fully understand the
> language.
> Also, new languages come and gone so fast. I remember Flash's language was
> hot some years ago but now discarded.
>
> Also FPC's compile time is short compared to many other languages.

Thanks for sharing this.

Best regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Who is using Object Pascal in production?

2017-10-29 Thread Marcos Douglas B. Santos via Lazarus
On Sun, Oct 29, 2017 at 2:24 PM, Giuliano Colla
<giuliano.co...@fastwebnet.it> wrote:
> Il 28/10/2017 16:45, Marcos Douglas B. Santos via Lazarus ha scritto:
>
>> Do you have problems to find new Pascal programmers?
>
> Experienced Pascal programmers are hard to find here in Italy.
> But we've found that a good young programmer (usually trained in C) usually
> appreciates the beauty of Pascal language, becomes fond of it, and very
> quickly productive.
> As in any case a new programmer must be trained to get acquainted with
> company software practices, the extra time required to grasp the
> fundamentals of Pascal is almost negligible.

In fact, this is a good strategy. But makes me thinking if is
difficult to find C programmers as well.
The C language is old as Pascal. Why people continues learning C but not Pascal?

If Linux had been coded in Pascal, we might have a different history.  :)

Regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Who is using Object Pascal in production?

2017-10-28 Thread Marcos Douglas B. Santos via Lazarus
On Sat, Oct 28, 2017 at 5:23 PM, Graeme Geldenhuys via Lazarus
<lazarus@lists.lazarus-ide.org> wrote:
> On 2017-10-28 15:45, Marcos Douglas B. Santos via Lazarus wrote:
>>
>> As we can see, we can do everything with Object Pascal.
>> Unfortunately, the market don't have the same vision.
>
>
> To be honest, sometimes it is not enough just to be able to do everything
> other languages do.
>
> For example: With Java and Spring Boot I can implement a Enterprise grade
> web application (that can scale over multiple servers etc) with embedded web
> server, object persistence, high grade web security, MVC based web UI all in
> about 5 minutes. Yes, it will be a simple Address Book style application,
> but considering all the features that application has - it's good damn
> impressive for 5 minutes of effort.
>
> I can't see the above being possible with today's FPC and Lazarus.

Maybe using the next version of fcl-web... but I don't know.
But even if FPC could do the same in 1 minute, do you think Java
developers may see Object Pascal with a different thinking? I don't
think so.

> My point is, it is often the speed at which you can develop projects that
> makes a big difference - not just the ability of the language or IDE.

In the other hand, we can to other things faster and better using
Object Pascal than other languages.
But, for me, market doesn't see in that way. They don't (much) care if
you are using the *right* tool for a job. They — most — want to know
if this job could be make by anyone else, not only *specialists*, even
if the project has quality and was delivered faster.

This is a wrong thinking, but it's true and many companies.

Best regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Who is using Object Pascal in production?

2017-10-28 Thread Marcos Douglas B. Santos via Lazarus
On Sat, Oct 28, 2017 at 1:22 PM, Paul Breneman via Lazarus
<lazarus@lists.lazarus-ide.org> wrote:
> On 10/28/2017 10:57 AM, Marcos Douglas B. Santos via Lazarus wrote:
>>
>> On Fri, Oct 27, 2017 at 9:58 PM, Daithi Haxton via Lazarus
>> <lazarus@lists.lazarus-ide.org> wrote:
>>>
>>>> On Oct 27, 2017, at 8:26 AM, Marcos Douglas B. Santos via Lazarus
>>
>> I see many developers working with Object Pascal in similar cases:
>> Machines, embedded, etc.
>> That's really cool... However, is a kind of niche, right?
>
> Yes, but such niches are *nice* so if anyone wants to help out please join
> me: www.ControlPascal.com

Yeah, of course they are. I said that only to understand better. Thanks.

Regards,
Marcos Douglas

PS. For me the website is down.
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Who is using Object Pascal in production?

2017-10-28 Thread Marcos Douglas B. Santos via Lazarus
On Sat, Oct 28, 2017 at 4:28 PM, Paul Michell via Lazarus
<lazarus@lists.lazarus-ide.org> wrote:
> On 27/10/17 16:36, Marcos Douglas B. Santos via Lazarus wrote:
>>
>> I didn't understand when you said "DLL behind the scenes" using web
>> interface.
>> If you can explain, I would appreciate.
>
> The OS programmers are using a Windows server (I think with ASP or some such
> MS technology).  From this they can call the Windows DLL version of the
> transform, then pass the results back to the HTML output.  I was not
> involved in that part of the project, but there is definitely some Free
> Pascal generated code running on their server!

Hmm, I believe you're talking about ActiveX. These ASP pages could
call this `components` directly.
Thanks for explain that.

Regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Who is using Object Pascal in production?

2017-10-28 Thread Marcos Douglas B. Santos via Lazarus
On Fri, Oct 27, 2017 at 10:39 PM, Michael Thompson
 wrote:
>
> I'm no longer a commercial developer.  However, I continue to carry Lazarus
> around on a USB key.  I frequently work away from home, but where-ever I am,
> whatever I'm working on, I can develop tools to make data processing easier.

I do the same. I have a portable HD with all my environment that is
synchronized every week. It is simple to maintain and portable.
I've never tried do the same with C# or Java environments... :)

> Why Laz/fpc?  wiki/forum/mailing list always have the answers, and there's a
> great community.  Lazarus & Freepascal are both strong mature tools.

I agree.
But, being a "advocate of the devil" and considering other
languages/environments, don't you agree that  Lazarus & Freepascal
could be just a "drop of water in the whole ocean"?

> Wonderful set of packages ship with Lazarus - far more than I need. I also
> carry around CCR (I recently used fpspreadsheet for the first time - awesome
> product).  Only library I use that's not provided as part of the Lazarus
> package is ZEOS for it's Oracle connection.
>
> I keep being surprised by Lazarus. Just keeps going from strength to
> strength.

Yeah. Lazarus and FPC is growing faster nowadays.

Best regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Who is using Object Pascal in production?

2017-10-28 Thread Marcos Douglas B. Santos via Lazarus
On Fri, Oct 27, 2017 at 10:42 PM, Luiz Americo Pereira Camara via
Lazarus <lazarus@lists.lazarus-ide.org> wrote:
>
> 2017-10-27 13:12 GMT-03:00 Marcos Douglas B. Santos via Lazarus
> <lazarus@lists.lazarus-ide.org>:
>>
>>
>> I am asking this because sometimes I cannot make a project if I say
>> that will be coded in Object Pascal.
>> I have heard a client saying: We use C# or . We don't have
>> more Pascal programmers to maintain this.
>>
>
> I have similar issue. I'm looking for third party companies to accelerate
> development of my current app (used in production by around 200 people a
> day) and they all say that is obsolete technology and will not find
> programmers to maintain

That is my main issue and I don't know how to solve this using Object Pascal.

>
> The current Delphi (sad) state is not helping...

I agree. It's not stable and the price...

Best regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Who is using Object Pascal in production?

2017-10-28 Thread Marcos Douglas B. Santos via Lazarus
On Fri, Oct 27, 2017 at 9:58 PM, Daithi Haxton via Lazarus
<lazarus@lists.lazarus-ide.org> wrote:
>
>> On Oct 27, 2017, at 8:26 AM, Marcos Douglas B. Santos via Lazarus 
>> <lazarus@lists.lazarus-ide.org> wrote:
>>
>> I would like to propose a discussion about "What is the relevance of
>> Object Pascal nowadays".
>> I don't want waste your time. I just want to know if we are growing
>> and being more relevant or not.
>>
>
> We use Lazarus/Free Pascal to build all of our production applications.
> These are basically instrumentation packages and data loggers for large
> machines used in automotive manufacturing and quality control. It’s cross
> platform (Linux/Windows), fast and easy to use and maintain.

I see many developers working with Object Pascal in similar cases:
Machines, embedded, etc.
That's really cool... However, is a kind of niche, right?

> What’s not to like?

:)

Best regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Who is using Object Pascal in production?

2017-10-28 Thread Marcos Douglas B. Santos via Lazarus
On Fri, Oct 27, 2017 at 2:46 PM, Ralf Quint via Lazarus
 wrote:
>
> If you are looking into all "new" stuff, it's nothing more than turning
> into Homer Simpson ("Oh, shiny!"). You spend more time to try and stay
> atop of all the latest fads but don't get anything real done. There
> might be the one or two things that some of those new gadgets can do
> better/easier but in the long run, barely any of them is of
> significance, by any count, in a few years...

I totally agree with you. That is one of the reasons that I continue
using Object Pascal.
I work in a company but I work as a freelancer/consultor as well. I
use Object Pascal in both cases, but as I said in other email,
sometimes it is difficult choose Object Pascal to build software for
my clients because they think that it's an obsolete technology.

> I can do everything I need to do (and then some) with
> FreePascal/Lazarus. Yes, there are some areas where a bit more work is
> needed, like being able to create Android/iOS applications with Lazarus
> in the way it can be done with Delphi, or creating applications for
> macOS. Or coding for embedded stuff with AVR based boards. Something
> that IMHO should be put more focus on than adding the latest fads from
> other programming languages to the compiler, just because some people
> THINK they need this.

+1
I agree, again.

Best regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Who is using Object Pascal in production?

2017-10-28 Thread Marcos Douglas B. Santos via Lazarus
On Fri, Oct 27, 2017 at 2:18 PM, Giuliano Colla via Lazarus
 wrote:
>
> We're working in the field of automatic machines. From textile machines to
> printer post-processing equipments (mainly in the security printers field),
> from coffee roasting machines to chain wear monitoring equipment. We do not
> usually deploy software, but rather we sell control equipments which are
> then integrated by the final manufacturer in the machine.
>
> Our equipments usually include custom embedded controllers and a supervisor
> which may range from an industrial grade PC to a Raspberry PI. It provides
> both the human interface and the real-time high-level process control.
>
> We're also frequently asked to integrate our supervisor into the factory
> data network both to provide production data (for statistical purposes,
> quality assurance, and security) and to fetch process information when
> appropriate. This leads to supplying also small servers which do handle
> network protocols, Data Base handling, creating Reports etc.
>
> We found today's Object Pascal and Lazarus to be the most cost effective
> solution, for a number of reasons. Mainly:
>
> - Object pascal syntax makes it easier to detect programmer errors at compile
> time, thus strongly reducing the debug time.
> - Being most projects quite similar and with very short development time
> allowed, we need readable and self documenting sources, making it easy for
> anyone to modify project A into project B.
> - For the same reason, re-usability of code for us is a must. Again Object
> Pascal is a winner by this POV.
> - Always for the same reason we need a RAD tool, and Lazarus IDE is again a
> winner.
> - We need to interface with our real-time framework with predictable timing,
> and this rules out most of the "modern" languages.
> - Given the relative stability of the Object Pascal language, we may take
> advantage of a huge amount of code we have developed in the past. I've just
> ported to Lazarus a program which was originally developed in the 90's with
> Delphi 3!

As we can see, we can do everything with Object Pascal.
Unfortunately, the market don't have the same vision.

> Many of those reasons apply also to Delphi, but we dropped Delphi long ago
> because:
>
> 1. Primarily, we need Linux support, because of the real-time requirements,
> which aren't achievable in Windows environment. OS-X isn't an option because
> we need industrial grade PC's.
> 2. Secondarily, Lazarus IDE is light years better than Delphi IDE.

I totally agree with you about the second item.

> For sake of completeness, I must add that our real-time framework and the
> real-time tasks are written in C. This was a must when it had to be part of
> a patched Linux kernel, running in kernel space. Now that RT_PREEMP has
> reached maturity and has made its way into the mainline kernel we've been
> able to move the stuff to user space. Therefore we're rewriting most of it
> in Object Pascal, to take advantage of a much lower development and
> maintenance cost.

That is other excellent case study...
Maybe we all could build a website to write those cases and provide
more information about Object Pascal nowadays.

Do you have problems to find new Pascal programmers?

Regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Who is using Object Pascal in production?

2017-10-27 Thread Marcos Douglas B. Santos via Lazarus
On Fri, Oct 27, 2017 at 12:13 PM, Michael Van Canneyt
 wrote:
>
> Where to start ?
>
> Go is a very nice language, but is very difficult to get to work with
> external libraries. Writing imports can be next to impossible.
> Our server needs to do LOTS of things that simply cannot be done in Go,
> since Go doesn't have the necessary functionality (or libraries, or modules)
> so we'd need to offload that to C libs, which kind of defeats the purpose.
>
> Java would be a possibility, but
>
> a) I don't know Java so well. Java is HUGE.
>
> b) Then you need to deal with the Java VM and Tomcat and whatnot.
>Not pleasant. Recently we had a java service completely unresponsive for
>30 seconds, it was doing GC... Not acceptable at all.
>
> Node.js is nice for some scripting, but IMO Javascript is not suitable for
> large
> applications. Complete absence of type checking or any form of compilation
> is a disaster for large projects.
>
> Additionally, when using Node.js, you almost inevitably come into contact
> with npm.
> We built some mobile apps using a web runtime, and typical usage for Node.js
> is packaging of the app. This typically uses npm.
>
> npm pulled in 1200+ npm packages (100+mb), to pack an application of 1200
> lines
> of javascript. Not a joke. I actually checked. And to pack an application in
> essence means:
> creating a zip. IMO the people using node.js and npm are deluded, to allow
> such a mess.
>
> Suffices that 1 of the 1200 packages for what reason whatsoever is broken,
> retracted or whatnot: the whole system comes crashing down...
>
> (The upcoming pas2js can target node.js, and I am confident you will not
> need npm.)
>
> To make matters worse, javascript developers have no sense of time.
> They actually think that completely breaking backwards compatibility after 2
> years is OK.
> For example, the change of Angular to Angular 2 (and subsequent changes)
> made me decide that Angular is unsuitable for development - despite all the
> nifty features.
>
> The average lifetime of applications I make is many many years.
> So, backwards compatibility is VERY important.
>
> So. For all these reasons, I use Object Pascal. I can take my 10 year old
> application, recompile, and be reasonably sure it will still work.

WOW... Actually, you have good reasons. I liked.

I am asking this because sometimes I cannot make a project if I say
that will be coded in Object Pascal.
I have heard a client saying: We use C# or . We don't have
more Pascal programmers to maintain this.

To develop desktop apps, it's not a problem. But if it will be a web
app, could be.
I will use your text, next time.  :)

About performance, do you believe that FastCGI is good or even better
than these other technologies?

Best regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Who is using Object Pascal in production?

2017-10-27 Thread Marcos Douglas B. Santos via Lazarus
On Fri, Oct 27, 2017 at 11:56 AM, Aurimenes Apolonio via Lazarus
 wrote:
> I'm starting my company based entirely in Lazarus. It's an ERP application,
> with desktop and web modules.
>
> I believe we can do (almost) everything with FPC/Lazarus.

+1
I agree.

Best regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Who is using Object Pascal in production?

2017-10-27 Thread Marcos Douglas B. Santos via Lazarus
On Fri, Oct 27, 2017 at 12:03 PM, Paul Michell via Lazarus
 wrote:
> I have used Free Pascal and Lazarus for several production systems over the
> last decade or so.  The most recent being for the UK Ordnance Survey:
>
> https://www.ordnancesurvey.co.uk/business-and-government/help-and-support/navigation-technology/os-net/grid-inquest.html
>
> The web interface also uses a DLL behind the scenes that is written in Free
> Pascal too.  I personally prefer to use Object Pascal for any project and
> only swap to some other language if I have to!

Thank you for shared this.
I didn't understand when you said "DLL behind the scenes" using web interface.
If you can explain, I would appreciate.

Best regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Who is using Object Pascal in production?

2017-10-27 Thread Marcos Douglas B. Santos via Lazarus
On Fri, Oct 27, 2017 at 11:54 AM, Michalis Kamburelis via Lazarus
 wrote:
>
> We use Object Pascal (FPC) to develop games, with my "Castle Game
> Engine", as part of the "Cat-astrophe Games" studio. We make Android
> and iOS games ("Escape from the Universe" is our main title now, with
> iOS release hopefully in ~2 weeks), and we plan to release a Steam
> game next year. So, both mobile and desktop.

Yeah, that is a excellent case study.
I believe most game programmers are using C/C++ and Lua.
Is it difficult to you find Pascal programmers?

Regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Who is using Object Pascal in production?

2017-10-27 Thread Marcos Douglas B. Santos via Lazarus
On Fri, Oct 27, 2017 at 11:39 AM, Celâl Emre ÖZ via Lazarus
 wrote:
> I use Lazarus for all my applications. Device monitoring software, our
> account mang. and ERP applc.

Me too. The "problem" is find more people to work with Object Pascal.
Do you have this problem in your company?

Best regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Who is using Object Pascal in production?

2017-10-27 Thread Marcos Douglas B. Santos via Lazarus
On Fri, Oct 27, 2017 at 11:32 AM, Michael Van Canneyt via Lazarus
 wrote:
>
> I use it almost exclusively on the server. Webservice, REST related stuff.
>
> But there are many domains where Object Pascal still works very well.

You've been doing a great job on fcl-web (thanks).
I have REST services running on Windows IIS with FastCGI.

I would like to ask you: Why not use Node.js, Go, or even Java?
Is it just because you know more Pascal or, also, because you have
some advantages using it on the server?

Regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Who is using Object Pascal in production?

2017-10-27 Thread Marcos Douglas B. Santos via Lazarus
I would like to propose a discussion about "What is the relevance of
Object Pascal nowadays".
I don't want waste your time. I just want to know if we are growing
and being more relevant or not.

I use Object Pascal (mostly FPC, some old Delphi) in production to
make real applications. But we are seeing more and more "new
frameworks", "new technologies" and new languages that are become more
relevant.

What do you think?

Thanks.

Regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] IPC: TSimpleIPC, ZeroMQ, nanomsg...

2017-10-19 Thread Marcos Douglas B. Santos via Lazarus
On Thu, Oct 19, 2017 at 2:42 PM, Sandro Cumerlato via Lazarus
 wrote:
> ZeroMQ (libzmq 4.2.2) header binding for FPC is available at:
>
> https://github.com/DJMaster/zeromq-fpc

Yeah, I saw this on ZeroMQ website.
Thanks anyway.

Regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] IPC: TSimpleIPC, ZeroMQ, nanomsg...

2017-10-18 Thread Marcos Douglas B. Santos via Lazarus
Hi,

I would like to know if someone has already worked with Messages
between different programs, made in different languages, with binds to
work in FPC and Delphi 7.

My main case is connect a old Delphi 7 program to have a
"conversation" with others Exes, coded in FPC, locally.

But in the future, I will need to send/receive messages through
network, "talking" with Java and C# services.

Some options that I have already seen:
- ZeroMQ -> http://zeromq.org/
- nanomsg -> http://nanomsg.org/

I would like to use a "famous" library, which has good documentation
with many binds, or to use the simpler one that allows me to use in
all these languages above.

What do you propose?

Best regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Packages and units with the same name

2017-10-15 Thread Marcos Douglas B. Santos via Lazarus
On Sun, Oct 15, 2017 at 12:36 PM, leledumbo via Lazarus
 wrote:
>> I know how it works in a single program, but I thought that using
>> packages could be different... but not.
>
> Packages is Lazarus concept, the compiler has no idea about it at all. What
> Lazarus does with it is generate a unit with the same name as the .lpk
> containing all units belonging to the package in its uses clause (with
> additional Register procedure and initialization section containing
> RegisterPackage call, purely for linking with the IDE), then feed the
> compiler with it. The end result is no different than compiling the units
> manually. In the end, when used by a program, it's the same combinations of
> .o and .ppu pair that the compiler sees.

I see. Thanks.

Regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] SimpleIPC

2017-10-14 Thread Marcos Douglas B. Santos via Lazarus
On Sat, Oct 14, 2017 at 3:38 PM, Terry A. Haimann via Lazarus
 wrote:
> I would like to see a example program forSimpleIPC Server and client.
> It would be most helpful if these were cli programs so that I could see
> what libraries were required.

There are some examples in \packages\fcl-process\examples directory.

Regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Packages and units with the same name

2017-10-14 Thread Marcos Douglas B. Santos via Lazarus
On Sat, Oct 14, 2017 at 4:33 AM, Sven Barth via Lazarus
<lazarus@lists.lazarus-ide.org> wrote:
> Am 14.10.2017 00:03 schrieb "Marcos Douglas B. Santos via Lazarus"
> <lazarus@lists.lazarus-ide.org>:
>>
>> On Fri, Oct 13, 2017 at 6:40 PM, Sven Barth via Lazarus
>> <lazarus@lists.lazarus-ide.org> wrote:
>> > On 13.10.2017 21:32, Marcos Douglas B. Santos via Lazarus wrote:
>> >> [...]
>> >>
>> >> IMHO, would be better if packages may have just some "exported units".
>> >> What do you think?
>> >
>> > It doesn't matter. Any symbols in a unit are mangled only locally to the
>> > unit and there *can not* be two or more symbols with the same name in
>> > one program. What you ask for is simply not possible.
>>
>> Is it not possible *today* or never?
>> I don't know how the compiler works, but try to understand me:
>> I would like to modularize a big program in small packages — because
>> it's better than to use dll/so.
>> Each one these packages will work in a bounded context. Each one may
>> have a "Facade" to the main program, exposing its "interface" (classes
>> and interfaces, most).
>> So, the main program shouldn't know nothing about "private units" that
>> belongs only for the package.
>> That is encapsulation too.
>
> I can very reasonably say that this will never be possible. It's simply how
> things work on the binary level. And as I said that's also true for dynamic
> packages (which are a different beast than Lazarus' packages): even if a
> unit becomes part of a package it won't be touched as it can be used as part
> of the package as well as directly in the application binary without any
> changes.
> Unit names *must* be unique inside a program (with or without packages). So
> better use prefixes or dotted unit names to reduce the chance for conflicts.

My next question would be about dynamic packages... but you've already
answered me.
Thanks for all information.

Best regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Packages and units with the same name

2017-10-13 Thread Marcos Douglas B. Santos via Lazarus
On Fri, Oct 13, 2017 at 6:40 PM, Sven Barth via Lazarus
<lazarus@lists.lazarus-ide.org> wrote:
> On 13.10.2017 21:32, Marcos Douglas B. Santos via Lazarus wrote:
>> [...]
>>
>> IMHO, would be better if packages may have just some "exported units".
>> What do you think?
>
> It doesn't matter. Any symbols in a unit are mangled only locally to the
> unit and there *can not* be two or more symbols with the same name in
> one program. What you ask for is simply not possible.

Is it not possible *today* or never?
I don't know how the compiler works, but try to understand me:
I would like to modularize a big program in small packages — because
it's better than to use dll/so.
Each one these packages will work in a bounded context. Each one may
have a "Facade" to the main program, exposing its "interface" (classes
and interfaces, most).
So, the main program shouldn't know nothing about "private units" that
belongs only for the package.
That is encapsulation too.

Best regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Packages and units with the same name

2017-10-13 Thread Marcos Douglas B. Santos via Lazarus
On Fri, Oct 13, 2017 at 4:16 PM, Mattias Gaertner via Lazarus
<lazarus@lists.lazarus-ide.org> wrote:
> On Fri, 13 Oct 2017 15:42:27 -0300
> "Marcos Douglas B. Santos via Lazarus" <lazarus@lists.lazarus-ide.org>
> wrote:
>
>>[...]
>> I thought that only units included in package would be visible outside
>> (other programs/packages) but I realized that doesn't matter if were
>> included or not, the visibility is defined only by path (-Fu).
>
> Correct. Unit names must be unique in a program.

Right. But when we use 3rd packages, we don't control which names they
will use to name their units.
Moreover, I believe each package should work only in a bounded
context. Its developers should not named their files considering that
these names could be used in a bigger context. Don't you agree?

IMHO, would be better if packages may have just some "exported units".
What do you think?

Best regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Kitto2 for Rich Internet Applications

2017-09-28 Thread Marcos Douglas B. Santos via Lazarus
On Thu, Sep 28, 2017 at 10:43 AM, Michael Van Canneyt via Lazarus
<lazarus@lists.lazarus-ide.org> wrote:
>
>
> On Thu, 28 Sep 2017, Marcos Douglas B. Santos via Lazarus wrote:
>
>> Hi,
>>
>> I would like to know if anybody here has already used Kitto2
>> https://github.com/EtheaDev/kitto2
>> This project used or was based on the old ExtPascal.
>>
>> My question is because this project compiles only in Delphi and maybe
>> somebody here has already ported to FPC or thought on it.
>>
>> I opened an issue there https://github.com/EtheaDev/kitto2/issues/2 about
>> this.
>
>
> Kitto2 is a dead end, just as ExtPascal was.

They removed ExtPascal from it... but I've never tried Kitto2.

> Nevertheless, now that Embarcadero embraced it, I doubt they will consider
> porting to FPC.

The author have no objections...
But if you say that FPC already has something better (December,
right?), I'll choose fcl-web, of course.

(and I do not saying that I will use Kitto2... was just to know)

Best regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Kitto2 for Rich Internet Applications

2017-09-28 Thread Marcos Douglas B. Santos via Lazarus
Hi,

I would like to know if anybody here has already used Kitto2
https://github.com/EtheaDev/kitto2
This project used or was based on the old ExtPascal.

My question is because this project compiles only in Delphi and maybe
somebody here has already ported to FPC or thought on it.

I opened an issue there https://github.com/EtheaDev/kitto2/issues/2 about this.

Best regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Converting all code to use UnicodeString

2017-09-27 Thread Marcos Douglas B. Santos via Lazarus
On Wed, Sep 27, 2017 at 7:05 AM, Juha Manninen via Lazarus
<lazarus@lists.lazarus-ide.org> wrote:
> On Tue, Sep 26, 2017 at 10:52 PM, Marcos Douglas B. Santos via Lazarus
> [...]
> About the string constant concatenation, just use variables when it is proper:
> const
>   V1: string = 'a';
> var
>   S1: String;
> ... later in code ...
>   S1 := V1 + 'b';
>
> String literals can be assigned without problems as long as your
> variables are "String".
> The big table in the wiki page is intimidating, in reality the issue
> is not so complex.

I'm already doing that.
This not perfect, but is better than have problems. Thanks.

Best regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Converting all code to use UnicodeString

2017-09-27 Thread Marcos Douglas B. Santos via Lazarus
On Wed, Sep 27, 2017 at 5:16 AM, Graeme Geldenhuys via Lazarus
<lazarus@lists.lazarus-ide.org> wrote:
> On 2017-09-27 03:51, Marcos Douglas B. Santos via Lazarus wrote:
>>
>> A constant that
>> can change...
>
>
>
> Yeah, that concept still blows my mind. [figuratively speaking] They should
> shoot the developer that came up with that idea - and the team leader that
> approved it.

Everybody has crazy ideias... the problem is who sign them saying
"yeah, go ahead!" :)

Regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Converting all code to use UnicodeString

2017-09-26 Thread Marcos Douglas B. Santos via Lazarus
On Tue, Sep 26, 2017 at 5:06 PM, Howard Page-Clark via Lazarus
<lazarus@lists.lazarus-ide.org> wrote:
> On 26/09/17 20:51, Marcos Douglas B. Santos via Lazarus wrote:
>>
>> I understood that I can use like this:
>> const
>>VALUE: string = 'áéíóú';
>>
>> Not like this:
>> const
>>VALUE = 'áéíóú';
>>
>> Right?
>> But this is not compile:
>> const
>>V1: string = 'a';
>>V2: string = V1 + 'b';
>
> You can't do that in a const declaration.
> But in an implementation, the following does compile:
>
> {$J+} {$H+}
> const
>   V1: string = 'a';
>   V2: string = 'b';
>   V3: String = '';
>
> begin
>   V3:=V1 + V2;
>   WriteLn(V3);
> end.

I know this trick that was deprecated a long time ago. A constant that
can change...
I think may be better not using constants in the code anymore.

But thanks, anyway.


Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Converting all code to use UnicodeString

2017-09-26 Thread Marcos Douglas B. Santos via Lazarus
On Tue, Sep 26, 2017 at 9:09 AM, Juha Manninen via Lazarus
<lazarus@lists.lazarus-ide.org> wrote:
> On Tue, Sep 26, 2017 at 12:11 AM, Marcos Douglas B. Santos via Lazarus
> <lazarus@lists.lazarus-ide.org> wrote:
>> Yeah, but DOM uses DOMString, which is WideString.
>> Lazarus uses UTF8 and have a laz2_DOM that uses "string", which is
>> UTF8, but I cannot use this unit with XPath unit, which needs a
>> TXMLDocument that works with WideString... see my point?
>
> That is a problem. I guess you can use the units with Lazarus but it
> results to many conversions between encodings.
> It should be solved somehow.

So we can say that Lazarus code do not use XPath to work with XML, right?


Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


  1   2   >