From bo.berglund at gmail.com Sat Jan 2 12:09:30 2021 From: bo.berglund at gmail.com (Bo Berglund) Date: Sat, 02 Jan 2021 12:09:30 +0100 Subject: [Lazarus] Tooltip shows value of some but not all const items.... Message-ID: I am using Lazarus 2.0.8/fpc3.0.4 on RaspberryPi4. When working on Windows -> Linux porting of an old Delphi app I have noted that the Lazarus IDE behaves differently when I hover the mouse over a const item in the source editor. The consts are declared in the top of the implementation section to be global in the file. 1) The const is declared like this: MKFILE= #$E5; When I hover the mouse I see: "const MKFILE = #$E5" 2) The const is declared like this: REMMEASON: char = #$D5; When I hover the mouse I see: "const REMMEASON: char" So in one case I see the value of the const and in the other case only the type... Is there some Lazarus setting that will enable always showing the value? Another question: ----------------- Is there a difference between the two types of declarations? I think that the # specifier of the value also declares the const as a char in the first place, or not? If there is no difference to the compiler I could remove the char type item for these consts and then be able when navigating the code to see what the const value actually is, right? I really do not know why there is a difference there, the code was worked on from 2004 to 2012 in Delphi 7/2007, but we need to get away from Windows now so I am porting it to FPC/Lazarus... -- Bo Berglund Developer in Sweden From wkitty42 at windstream.net Sat Jan 2 12:27:46 2021 From: wkitty42 at windstream.net (wkitty42 at windstream.net) Date: Sat, 2 Jan 2021 06:27:46 -0500 Subject: [Lazarus] Tooltip shows value of some but not all const items.... In-Reply-To: References: Message-ID: <47061ee5-8ddc-eadd-8c55-3cf9c9772baa@windstream.net> On 1/2/21 6:09 AM, Bo Berglund via lazarus wrote: > MKFILE= #$E5; this is a constant... > REMMEASON: char = #$D5; this is a typed constant... that's the difference between the two i see immediately... i don't think there's a setting like you asked about but i haven't looked... seems like a possible oversight or defect, tho... -- NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list where it belongs!* From pascaldragon at googlemail.com Sat Jan 2 12:36:06 2021 From: pascaldragon at googlemail.com (Sven Barth) Date: Sat, 2 Jan 2021 12:36:06 +0100 Subject: [Lazarus] Tooltip shows value of some but not all const items.... In-Reply-To: References: Message-ID: <55c32e05-05d2-555b-270f-442fd7f8b441@googlemail.com> Am 02.01.2021 um 12:09 schrieb Bo Berglund via lazarus: > Is there some Lazarus setting that will enable always showing the > value? You would probably need to do a feature request for that. > Another question: > ----------------- > Is there a difference between the two types of declarations? > I think that the # specifier of the value also declares the const as a > char in the first place, or not? The first is a "untyped constant". It takes its type implicitely from the right side and not everything can be a constant (e.g. you can't use records). So in your case, yet's it's a Char due to the right side being a character constant. The second is a so called "typed constant". They are essentially variables that might be readonly (they are readonly if {$J-} is set which is *not* the default). They were originally introduced in Turbo Pascal to allow for static variables inside functions (cause that is how they behave). The main difference is that an untyped constant can be used inside constant expressions (e.g. to declare a static array with certain bounds) while a typed constant can not. On the other hand you can take the address of a typed constant (as it's essentially a variable with readonly data) while you can't do that for untyped constants. And yes, it behaves this way in Delphi, too. Regards, Sven From michael at freepascal.org Sat Jan 2 15:31:11 2021 From: michael at freepascal.org (Michael Van Canneyt) Date: Sat, 2 Jan 2021 15:31:11 +0100 (CET) Subject: [Lazarus] FPDoc now with Markdown support Message-ID: Hello ! I didn't make it quite in time for the new year, but still: The fpdoc engine (what is used to document the FPC & Lazarus units) is now capable of outputting the documentation in markdown. This can be used as input for mkdocs or another engine such as sphinx. As a first engine, I tackled mkdocs. Compare the official page for TObject.Dispatch: https://www.freepascal.org/docs-html/current/rtl/system/tobject.dispatch.html With the following pages: They are all the same documentation page, but just use a different theme for mkdocs: gitbook theme: https://www.freepascal.org/~michael/docs-demo/gitbook/system/tobject.dispatch/ ivory theme: https://www.freepascal.org/~michael/docs-demo/ivory/system/tobject.dispatch/ windmill theme: (seems broken) https://www.freepascal.org/~michael/docs-demo/windmill/system/tobject.dispatch/ windmill dark theme: (seems broken) https://www.freepascal.org/~michael/docs-demo/windmill-dark/system/tobject.dispatch/ docskimmer theme: https://www.freepascal.org/~michael/docs-demo/docskimmer/system/tobject.dispatch/ default (mkdocs) theme: https://www.freepascal.org/~michael/docs-demo/windmill-dark/system/tobject.dispatch/ readthedocs theme: https://www.freepascal.org/~michael/docs-demo/readthedocs/system/tobject.dispatch/ material theme: https://www.freepascal.org/~michael/docs-demo/material/system/tobject.dispatch/ Some themes work better than others. Fun fact: Generating the documentation in HTML with fpdoc takes a couple of seconds. Depending on the theme, generating the docs with mkdocs (written in Python) takes 3-7 minutes. Just shows that Pascal code is very efficient, I suppose... ;-) I've been looking at allowing markdown for the description files (they would be less verbose then), but there seems to be no decent markdown parser available for pascal. If somone cares to contribute one... Enjoy, Michael. From bo.berglund at gmail.com Sat Jan 2 23:29:24 2021 From: bo.berglund at gmail.com (Bo Berglund) Date: Sat, 02 Jan 2021 23:29:24 +0100 Subject: [Lazarus] Tooltip shows value of some but not all const items.... References: <55c32e05-05d2-555b-270f-442fd7f8b441@googlemail.com> Message-ID: On Sat, 2 Jan 2021 12:36:06 +0100, Sven Barth via lazarus wrote: >Am 02.01.2021 um 12:09 schrieb Bo Berglund via lazarus: >> Another question: >> ----------------- >> Is there a difference between the two types of declarations? >> I think that the # specifier of the value also declares the const as a >> char in the first place, or not? > >The first is a "untyped constant". It takes its type implicitely from >the right side and not everything can be a constant (e.g. you can't use >records). So in your case, yet's it's a Char due to the right side being >a character constant. > >The second is a so called "typed constant". They are essentially >variables that might be readonly (they are readonly if {$J-} is set >which is *not* the default). They were originally introduced in Turbo >Pascal to allow for static variables inside functions (cause that is how >they behave). > >The main difference is that an untyped constant can be used inside >constant expressions (e.g. to declare a static array with certain >bounds) while a typed constant can not. On the other hand you can take >the address of a typed constant (as it's essentially a variable with >readonly data) while you can't do that for untyped constants. > >And yes, it behaves this way in Delphi, too. Since I see no difference in the usage of these constants typed or not, I might as well remove the type declaration. After all I do not want thes to change like a variable can... The value is a char thanks to the #$ part, I guess. Or a byte, which is really what it is used as, they are command identifiers in a packet sent by RS232 to the equipment. -- Bo Berglund Developer in Sweden From andrey.sobol.nn at gmail.com Sun Jan 3 12:47:25 2021 From: andrey.sobol.nn at gmail.com (=?UTF-8?B?0KHQvtCx0L7Qu9GMINCQ0L3QtNGA0LXQuSDQldCy0LPQtdC90YzQtdCy0LjRhw==?=) Date: Sun, 3 Jan 2021 14:47:25 +0300 Subject: [Lazarus] FPDoc now with Markdown support In-Reply-To: References: Message-ID: <7DA556E7749A4994ADAF226167FBB567@AndreyWin7> > I've been looking at allowing markdown for the description files (they would > be less verbose then), but there seems to be no decent markdown parser available > for pascal. If somone cares to contribute one... For "overview pages" (unit, class, package) I think need to move a "description section" to up and set it above a "uses section", because "description" is more useful information than list of units. Especially for the case when the list of files is big. I think that need to do for a html version also. From ryansmithhe at gmail.com Sun Jan 3 12:59:34 2021 From: ryansmithhe at gmail.com (R.Smith) Date: Sun, 3 Jan 2021 13:59:34 +0200 Subject: [Lazarus] Component-View Presets Message-ID: <6779eb45-ef38-9613-f59b-cf9ed6c3adf3@gmail.com> Hi All, I'm using Lazarus in a multi-screen setup and prefer the Component-view form rather than using the menu-integrated top-palette to pick components from. In the Component-view there are 3 tabs: List, Palette and Inheritence - All of them great for what they do. My preference is to mainly use the Palette tab here, and then always start from the "Collapsed" state. (I will open the section I wish to use by clicking it - this is much faster than scrolling or typing in the search bar). Currently, every time i start Lazarus, I have to click the "Palette" Tab to select it, then right-click the list and do "Collapse all". It's not an insurmountable pain, but it is a pain in an otherwise flawless environment. Is there any way I could achieve that in a setting or such so that Lazarus starts by showing the Palette tab and starts it with the Collapsed state? Thanks you kindly, Ryan From michael at freepascal.org Sun Jan 3 13:43:01 2021 From: michael at freepascal.org (Michael Van Canneyt) Date: Sun, 3 Jan 2021 13:43:01 +0100 (CET) Subject: [Lazarus] FPDoc now with Markdown support In-Reply-To: <7DA556E7749A4994ADAF226167FBB567@AndreyWin7> References: <7DA556E7749A4994ADAF226167FBB567@AndreyWin7> Message-ID: On Sun, 3 Jan 2021, Соболь Андрей Евгеньевич via lazarus wrote: >> I've been looking at allowing markdown for the description files (they would >> be less verbose then), but there seems to be no decent markdown parser available >> for pascal. If somone cares to contribute one... > > For "overview pages" (unit, class, package) I think need to move a > "description section" to up and set it above a "uses section", because > "description" is more useful information than list of units. Especially > for the case when the list of files is big. I think that need to do for a > html version also. Good points. I am planning some small changes in the Markdown support. I already moved the description up (after declaration, before members). The uses section can indeed be moved down for units. I plan to add links to the const/classes/types sections, because the menu may not always be very accessible. I am currently refactoring the HTML version so the layout can be changed more easily, and descendents can be made. Once that is done, changes can be implemented. Michael. From pascaldragon at googlemail.com Sun Jan 3 14:35:08 2021 From: pascaldragon at googlemail.com (Sven Barth) Date: Sun, 3 Jan 2021 14:35:08 +0100 Subject: [Lazarus] Tooltip shows value of some but not all const items.... In-Reply-To: References: <55c32e05-05d2-555b-270f-442fd7f8b441@googlemail.com> Message-ID: <3e1e0371-607f-4aa8-f314-950f93f1ae1e@googlemail.com> Am 02.01.2021 um 23:29 schrieb Bo Berglund via lazarus: > On Sat, 2 Jan 2021 12:36:06 +0100, Sven Barth via lazarus > wrote: > >> Am 02.01.2021 um 12:09 schrieb Bo Berglund via lazarus: >>> Another question: >>> ----------------- >>> Is there a difference between the two types of declarations? >>> I think that the # specifier of the value also declares the const as a >>> char in the first place, or not? >> The first is a "untyped constant". It takes its type implicitely from >> the right side and not everything can be a constant (e.g. you can't use >> records). So in your case, yet's it's a Char due to the right side being >> a character constant. >> >> The second is a so called "typed constant". They are essentially >> variables that might be readonly (they are readonly if {$J-} is set >> which is *not* the default). They were originally introduced in Turbo >> Pascal to allow for static variables inside functions (cause that is how >> they behave). >> >> The main difference is that an untyped constant can be used inside >> constant expressions (e.g. to declare a static array with certain >> bounds) while a typed constant can not. On the other hand you can take >> the address of a typed constant (as it's essentially a variable with >> readonly data) while you can't do that for untyped constants. >> >> And yes, it behaves this way in Delphi, too. > Since I see no difference in the usage of these constants typed or > not, I might as well remove the type declaration. > After all I do not want thes to change like a variable can... > The value is a char thanks to the #$ part, I guess. > Or a byte, which is really what it is used as, they are command > identifiers in a packet sent by RS232 to the equipment. For most cases the two can indeed be considered equal, thus it doesn't matter which one you use. Your untyped constant will have type Char due to the # prefix. Regards, Sven From don.siders at gmail.com Sun Jan 3 20:48:03 2021 From: don.siders at gmail.com (Don Siders) Date: Sun, 3 Jan 2021 14:48:03 -0500 Subject: [Lazarus] FPDoc now with Markdown support Message-ID: >Hello ! > >I didn't make it quite in time for the new year, but still: > >The fpdoc engine (what is used to document the FPC & Lazarus units) >is now capable of outputting the documentation in markdown. > >This can be used as input for mkdocs or another engine such as sphinx. >As a first engine, I tackled mkdocs. > ... Happy New Year, Michael. I'm glad to see that FPDoc is getting some "love". I applaud any effort to improve or modernize the help. >I've been looking at allowing markdown for the description files (they would >be less verbose then), but there seems to be no decent markdown parser available >for pascal. If somone cares to contribute one... Oh boy. I guess it is inevitable, but I don't think it's a particularly good idea. I have no aversion to XML tagging. I don't mind its rigid nature because it guarantees consistent, predictable input. Markdown is anarchy in my opinion, and you can't impose order on anarchy. Markdown is great for readme or FAQ files. Not so great for a large, structured documentation project. I would never choose to author reference topics using markdown. I would rather see sectioning added to the FPDoc tags/content model:
Using the Control

Lorem ipsum sic dolor amet.

I'd like to see PDF output from FPDoc too. >Enjoy, >Michael. Thanks for your efforts. Best regards, Don From michael at freepascal.org Mon Jan 4 00:06:35 2021 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 4 Jan 2021 00:06:35 +0100 (CET) Subject: [Lazarus] FPDoc now with Markdown support In-Reply-To: References: Message-ID: On Sun, 3 Jan 2021, Don Siders via lazarus wrote: >> Hello ! >> >> I didn't make it quite in time for the new year, but still: >> >> The fpdoc engine (what is used to document the FPC & Lazarus units) >> is now capable of outputting the documentation in markdown. >> >> This can be used as input for mkdocs or another engine such as sphinx. >> As a first engine, I tackled mkdocs. >> ... > > Happy New Year, Michael. Thank you :-) > > I'm glad to see that FPDoc is getting some "love". I applaud any > effort to improve or modernize the help. Well, most 'love' has been going into the source parser in the last years. For my day job I came into contact with mkdocs and sphinx, and was impressed by some of the output it can generate. So the idea was born to leverage that in fpdoc. > >> I've been looking at allowing markdown for the description files (they would >> be less verbose then), but there seems to be no decent markdown parser available >> for pascal. If somone cares to contribute one... > > Oh boy. I guess it is inevitable, but I don't think it's a > particularly good idea. Personally, I don't plan to use Markdown as input for fpdoc. > > I have no aversion to XML tagging. I don't mind its rigid nature > because it guarantees consistent, predictable input. I agree fully with this point of view, but not everyone may agree :-). Times change, and I can imagine that people prefer a more 'free' format. I'm just hoping to attract more users and possibly contributors... > > Markdown is anarchy in my opinion, and you can't impose order on > anarchy. Markdown is great for readme or FAQ files. Not so great for a > large, structured documentation project. I would never choose to > author reference topics using markdown. Personally, I agree :-) > > I would rather see sectioning added to the FPDoc tags/content model: > > >
> Using the Control >

Lorem ipsum sic dolor amet.

>
>
And what would this do in terms ouf output ? > > I'd like to see PDF output from FPDoc too. Currently PDF is generated through LaTeX. The LaTeX typesetting engine is difficult to beat. Hyphenation, page breaks: you get all that for free. Both sphinx and mkdocs can also generate PDFs from the markdown. Using the fpPDF support of FPC it should of course be possible to create PDF output directly. Michael. From don.siders at gmail.com Mon Jan 4 01:50:36 2021 From: don.siders at gmail.com (Don Siders) Date: Sun, 3 Jan 2021 19:50:36 -0500 Subject: [Lazarus] FPDoc now with Markdown support In-Reply-To: References: Message-ID: On Sun, Jan 3, 2021 at 6:06 PM Michael Van Canneyt wrote: > >> I've been looking at allowing markdown for the description files (they would > >> be less verbose then), ... > > Oh boy. I guess it is inevitable, but I don't think it's a > > particularly good idea. > Personally, I don't plan to use Markdown as input for fpdoc. Seems both my assumption and jump to conclusion are unfounded. ;) > Times change, and I can imagine that people prefer a more 'free' format. > I'm just hoping to attract more users and possibly contributors... I spent too many years trying to do the same thing for an open source project... unsuccessfully I might add. It was my experience that changing the tooling does attract a little short-term interest, but not actual content contributors. > > I would rather see sectioning added to the FPDoc tags/content model: > > > > > >
> > Using the Control > >

Lorem ipsum sic dolor amet.

> >
> >
> > And what would this do in terms ouf output ? In general, it would make FPDoc more usable for non-reference type material. Grouping related content. If
has a name, it could provide another level of navigation in the TOC. It provides a standard way to tag a Formal Para, instead of emulating it it with:

Using the Control

Lorem ipsum sic dolor amet.

In specific,
could render like the HTML equivalent (as a biock). renders like the HTML H4 tag. The rest of the content model renders just like the current usage. > > I'd like to see PDF output from FPDoc too.> > Currently PDF is generated through LaTeX. Yeah... I know. > The LaTeX typesetting engine is difficult to beat. > Hyphenation, page breaks: you get all that for free. Sorry, but Latex gives me the hives. After twenty years, I still have DataLogic Pager nightmares. :) Don From steveg at nevets.com.au Mon Jan 4 04:58:23 2021 From: steveg at nevets.com.au (Steve Gatenby) Date: Mon, 4 Jan 2021 13:58:23 +1000 Subject: [Lazarus] Color Lists in Lazarus IDE Message-ID: <b5990ef6-cfda-5169-9c50-3239200a0ff5@nevets.com.au> Just a simple niggle if I could :) Is it possible to have the color combo dropdowns in the Object Inspector start at the top of the list when opened ? I find I am always scrolling the list up to find the base colors whilst form designing. Just a whinger sitting in a dark(ish) room a lot :) Thanks for all the work everybody does. SteveG Lazarus 2.1.0 r64317 FPC 3.3.1 x86_64-linux-gtk2 From bo.berglund at gmail.com Mon Jan 4 10:28:15 2021 From: bo.berglund at gmail.com (Bo Berglund) Date: Mon, 04 Jan 2021 10:28:15 +0100 Subject: [Lazarus] Component-View Presets References: <6779eb45-ef38-9613-f59b-cf9ed6c3adf3@gmail.com> Message-ID: <7ln5vftnvauc64l10mselj3ev231bj5t8g@4ax.com> On Sun, 3 Jan 2021 13:59:34 +0200, "R.Smith via lazarus" <lazarus at lists.lazarus-ide.org> wrote: >Hi All, I'm using Lazarus in a multi-screen setup and prefer the >Component-view form rather than using the menu-integrated top-palette to >pick components from. > >In the Component-view there are 3 tabs: List, Palette and Inheritence - >All of them great for what they do. > >My preference is to mainly use the Palette tab here, and then always >start from the "Collapsed" state. (I will open the section I wish to use >by clicking it - this is much faster than scrolling or typing in the >search bar). > >Currently, every time i start Lazarus, I have to click the "Palette" Tab >to select it, then right-click the list and do "Collapse all". It's not >an insurmountable pain, but it is a pain in an otherwise flawless >environment. > >Is there any way I could achieve that in a setting or such so that >Lazarus starts by showing the Palette tab and starts it with the >Collapsed state? > Is it not possible to set the palette in the wanted state and then create a custom desktop with a new name. Then if you use this desktop maybe the palette will appear in the wanted state? I cannot test this myself because I have crafted a custom desktop I don't want to destroy and I don't have space on my screen either (it is just 1920x1200 px). -- Bo Berglund Developer in Sweden From michael at freepascal.org Mon Jan 4 11:56:14 2021 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 4 Jan 2021 11:56:14 +0100 (CET) Subject: [Lazarus] FPDoc now with Markdown support In-Reply-To: <CADQ8pGJUZVjq3548RZQMOXvnSAasaP6AbTivLhPmi1uVJuQqqw@mail.gmail.com> References: <CADQ8pGLWAwMot9uwOPiYu8kDOnDi8Km47d==+LoM-M8pXMEbXA@mail.gmail.com> <alpine.DEB.2.22.394.2101032358110.395173@home> <CADQ8pGJUZVjq3548RZQMOXvnSAasaP6AbTivLhPmi1uVJuQqqw@mail.gmail.com> Message-ID: <alpine.DEB.2.22.394.2101041142170.408559@home> On Sun, 3 Jan 2021, Don Siders via lazarus wrote: >> > I would rather see sectioning added to the FPDoc tags/content model: >> > >> > <topic> >> > <section> >> > <title>Using the Control >> >

Lorem ipsum sic dolor amet.

>> >
>> > >> >> And what would this do in terms ouf output ? > > In general, it would make FPDoc more usable for non-reference type > material. Grouping related content. If
has a name, it could > provide another level of navigation in the TOC. It provides a standard > way to tag a Formal Para, instead of emulating it it with: > >

> Using the Control >

>

> Lorem ipsum sic dolor amet. >

> > In specific,
could render like the HTML equivalent (as a > biock). renders like the HTML H4 tag. The rest of the content > model renders just like the current usage. You do know that topics can be nested ? I can add 'section', but it will be below the <descr> node, as IMO it makes no sense to do this below the topic node because of the nesting. Michael. From juha.manninen62 at gmail.com Mon Jan 4 12:34:41 2021 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Mon, 4 Jan 2021 13:34:41 +0200 Subject: [Lazarus] Component-View Presets In-Reply-To: <6779eb45-ef38-9613-f59b-cf9ed6c3adf3@gmail.com> References: <6779eb45-ef38-9613-f59b-cf9ed6c3adf3@gmail.com> Message-ID: <CAPN1EhCHXJtMrfotdguf=R8wR50d5PGhRm8vvQOGOxw7SKh=0g@mail.gmail.com> On Sun, Jan 3, 2021 at 1:59 PM R.Smith via lazarus < lazarus at lists.lazarus-ide.org> wrote: > ..., but it is a pain in an otherwise flawless environment. > Lazarus project has over 2000 open bug reports, but yes it is *almost* flawless. :) Is there any way I could achieve that in a setting or such so that > Lazarus starts by showing the Palette tab and starts it with the > Collapsed state? > The chosen tab, in this case Palette tab, should be persistent and stored in a configuration file. It will be applied for sure if you implement it. The Expanded/Collapsed state would require an option. Where to put it? The global options page for Component Palette is crowded. A new page for just 1 or 2 new options sounds like waste of space. Any ideas? If the Component-view window gets its own options, maybe the "Keep open" Checkbox should go there, too. Juha -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20210104/2892d960/attachment.html> From fjf.vanleeuwen at quicknet.nl Mon Jan 4 15:28:01 2021 From: fjf.vanleeuwen at quicknet.nl (frans) Date: Mon, 4 Jan 2021 15:28:01 +0100 Subject: [Lazarus] TComboBox: Is different behaviour when DroppedDown possible? Message-ID: <ef03e40e-84f9-3e1d-5476-e966e8ca8cac@quicknet.nl> Hi, I'm searching for an alternative behaviour of the TComboBox when scrolling through the DroppedDown list. The selected item is also displayed in the text field. But I would that text field unchanged until the selected item is accepted by Enter. I've been searching the internet but can't find anything. My own programming skills are not of a level to create a solution myself. Did anyone else tried something like this? -- mvg Frans van Leeuwen M 06-51695390 -- Deze e-mail is gecontroleerd op virussen door AVG. http://www.avg.com From lazarus at kluug.net Mon Jan 4 16:14:47 2021 From: lazarus at kluug.net (Ondrej Pokorny) Date: Mon, 4 Jan 2021 16:14:47 +0100 Subject: [Lazarus] TComboBox: Is different behaviour when DroppedDown possible? In-Reply-To: <ef03e40e-84f9-3e1d-5476-e966e8ca8cac@quicknet.nl> References: <ef03e40e-84f9-3e1d-5476-e966e8ca8cac@quicknet.nl> Message-ID: <6275ee06-84be-88a2-1d62-ccd246e951f7@kluug.net> On 04.01.2021 15:28, frans via lazarus wrote: > I'm searching for an alternative behaviour of the TComboBox when > scrolling through the DroppedDown list. The selected item is also > displayed in the text field. But I would that text field unchanged > until the selected item is accepted by Enter. I've been searching the > internet but can't find anything. > My own programming skills are not of a level to create a solution > myself. Did anyone else tried something like this? TComboBox is a native control on all widgetsets, that means its behavior is under the control of the OS. I don't know what platform you are on, but at least on Windows this cannot be customized. You would need a completely custom TComboBox alternative. Ondrej From jmlandmesser at gmx.de Mon Jan 4 19:05:24 2021 From: jmlandmesser at gmx.de (John Landmesser) Date: Mon, 4 Jan 2021 19:05:24 +0100 Subject: [Lazarus] lazarus trunc IDE compile error Message-ID: <4968b0cd-6066-e548-f013-a70e49922af0@gmx.de> Something went wrong? last running trunc version:   Lazarus 2.1.0 r64270 FPC 3.2.0 x86_64-linux-gtk2 > /home/john1/lazarus/components/lazcontrols/spinex.inc(255,13)*Error: > (4057) Can't determine which overloaded function to call* > /usr/lib/fpc/3.2.0/units/x86_64-linux/rtl/math.ppu:math.pp(2580,10) > Hint: (5039) Found declaration: CompareValue(const Extended;const > Extended;Extended=` 0.00000000000000000000E+0000`):ShortInt; > /usr/lib/fpc/3.2.0/units/x86_64-linux/rtl/math.ppu:math.pp(2568,10) > Hint: (5039) Found declaration: CompareValue(const Double;const > Double;Double=` 0.00000000000000000000E+0000`):ShortInt; > /usr/lib/fpc/3.2.0/units/x86_64-linux/rtl/math.ppu:math.pp(2556,10) > Hint: (5039) Found declaration: CompareValue(const Single;const > Single;Single=` 0.00000000000000000000E+0000`):ShortInt; > /usr/lib/fpc/3.2.0/units/x86_64-linux/rtl/math.ppu:math.pp(2544,10) > Hint: (5039) Found declaration: CompareValue(const QWord;const > QWord):ShortInt; > /usr/lib/fpc/3.2.0/units/x86_64-linux/rtl/math.ppu:math.pp(2533,10) > Hint: (5039) Found declaration: CompareValue(const Int64;const > Int64):ShortInt; > /usr/lib/fpc/3.2.0/units/x86_64-linux/rtl/math.ppu:math.pp(2522,10) > Hint: (5039) Found declaration: CompareValue(const LongInt;const > LongInt):ShortInt; > spinex.pp(418) Fatal: (10026) There were 2 errors compiling module, > stopping > Fatal: (1018) Compilation aborted > make[1]: *** [Makefile:3154: lazcontrols.ppu] Fehler 1 > make[1]: Verzeichnis „/home/john1/lazarus/components/lazcontrols“ wird > verlassen > make: *** [Makefile:3636: lazbuild] Fehler 2 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20210104/f0b96796/attachment.html> From jmlandmesser at gmx.de Mon Jan 4 19:18:28 2021 From: jmlandmesser at gmx.de (John Landmesser) Date: Mon, 4 Jan 2021 19:18:28 +0100 Subject: [Lazarus] lazarus trunc IDE compile error In-Reply-To: <4968b0cd-6066-e548-f013-a70e49922af0@gmx.de> References: <4968b0cd-6066-e548-f013-a70e49922af0@gmx.de> Message-ID: <e984efe6-905b-7b88-a9cc-34eee7a8daf9@gmx.de> mpf ... this error occurs only on newest Deepin 20.1 (based on Debian 10??) No probs on Manjaro XFCE! Am 04.01.21 um 19:05 schrieb John Landmesser via lazarus: > > Something went wrong? > > last running trunc version:   Lazarus 2.1.0 r64270 FPC 3.2.0 > x86_64-linux-gtk2 > >> /home/john1/lazarus/components/lazcontrols/spinex.inc(255,13)*Error: >> (4057) Can't determine which overloaded function to call* >> /usr/lib/fpc/3.2.0/units/x86_64-linux/rtl/math.ppu:math.pp(2580,10) >> Hint: (5039) Found declaration: CompareValue(const Extended;const >> Extended;Extended=` 0.00000000000000000000E+0000`):ShortInt; >> /usr/lib/fpc/3.2.0/units/x86_64-linux/rtl/math.ppu:math.pp(2568,10) >> Hint: (5039) Found declaration: CompareValue(const Double;const >> Double;Double=` 0.00000000000000000000E+0000`):ShortInt; >> /usr/lib/fpc/3.2.0/units/x86_64-linux/rtl/math.ppu:math.pp(2556,10) >> Hint: (5039) Found declaration: CompareValue(const Single;const >> Single;Single=` 0.00000000000000000000E+0000`):ShortInt; >> /usr/lib/fpc/3.2.0/units/x86_64-linux/rtl/math.ppu:math.pp(2544,10) >> Hint: (5039) Found declaration: CompareValue(const QWord;const >> QWord):ShortInt; >> /usr/lib/fpc/3.2.0/units/x86_64-linux/rtl/math.ppu:math.pp(2533,10) >> Hint: (5039) Found declaration: CompareValue(const Int64;const >> Int64):ShortInt; >> /usr/lib/fpc/3.2.0/units/x86_64-linux/rtl/math.ppu:math.pp(2522,10) >> Hint: (5039) Found declaration: CompareValue(const LongInt;const >> LongInt):ShortInt; >> spinex.pp(418) Fatal: (10026) There were 2 errors compiling module, >> stopping >> Fatal: (1018) Compilation aborted >> make[1]: *** [Makefile:3154: lazcontrols.ppu] Fehler 1 >> make[1]: Verzeichnis „/home/john1/lazarus/components/lazcontrols“ >> wird verlassen >> make: *** [Makefile:3636: lazbuild] Fehler 2 >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20210104/9fbcd99e/attachment-0001.html> From lazarus at mfriebe.de Mon Jan 4 19:32:27 2021 From: lazarus at mfriebe.de (Martin Frb) Date: Mon, 4 Jan 2021 19:32:27 +0100 Subject: [Lazarus] lazarus trunc IDE compile error In-Reply-To: <4968b0cd-6066-e548-f013-a70e49922af0@gmx.de> References: <4968b0cd-6066-e548-f013-a70e49922af0@gmx.de> Message-ID: <18f38f74-aebd-0df8-df11-c1040a2bfab4@mfriebe.de> On 04/01/2021 19:05, John Landmesser via lazarus wrote: > > Something went wrong? > > last running trunc version:   Lazarus 2.1.0 r64270 FPC 3.2.0 > x86_64-linux-gtk2 > > Same with FPC 3.0.4 / 64bit / windows From werner.pamler at freenet.de Mon Jan 4 20:00:49 2021 From: werner.pamler at freenet.de (Werner Pamler) Date: Mon, 4 Jan 2021 20:00:49 +0100 Subject: [Lazarus] lazarus trunc IDE compile error In-Reply-To: <18f38f74-aebd-0df8-df11-c1040a2bfab4@mfriebe.de> References: <4968b0cd-6066-e548-f013-a70e49922af0@gmx.de> <18f38f74-aebd-0df8-df11-c1040a2bfab4@mfriebe.de> Message-ID: <bfbab451-d806-0e12-a52a-cc2a3cb5773a@freenet.de> Am 04.01.2021 um 19:32 schrieb Martin Frb via lazarus: > On 04/01/2021 19:05, John Landmesser via lazarus wrote: >> >> Something went wrong? >> >> last running trunc version:   Lazarus 2.1.0 r64270 FPC 3.2.0 >> x86_64-linux-gtk2 >> >> > Same with FPC 3.0.4 / 64bit / windows Sorry, the initial fix for FPC-trunk introduced another issue with FPC 3.2. Should work now. From jmlandmesser at gmx.de Mon Jan 4 21:25:11 2021 From: jmlandmesser at gmx.de (John Landmesser) Date: Mon, 4 Jan 2021 21:25:11 +0100 Subject: [Lazarus] lazarus trunc IDE compile error In-Reply-To: <bfbab451-d806-0e12-a52a-cc2a3cb5773a@freenet.de> References: <4968b0cd-6066-e548-f013-a70e49922af0@gmx.de> <18f38f74-aebd-0df8-df11-c1040a2bfab4@mfriebe.de> <bfbab451-d806-0e12-a52a-cc2a3cb5773a@freenet.de> Message-ID: <20dd3bed-9504-1c69-54a7-6cd650b9be34@gmx.de> Thanks. It compiles now! Am 04.01.21 um 20:00 schrieb Werner Pamler via lazarus: > Am 04.01.2021 um 19:32 schrieb Martin Frb via lazarus: >> On 04/01/2021 19:05, John Landmesser via lazarus wrote: >>> >>> Something went wrong? >>> >>> last running trunc version:   Lazarus 2.1.0 r64270 FPC 3.2.0 >>> x86_64-linux-gtk2 >>> >>> >> Same with FPC 3.0.4 / 64bit / windows > > Sorry, the initial fix for FPC-trunk introduced another issue with FPC > 3.2. Should work now. From mailinglists at geldenhuys.co.uk Tue Jan 5 10:36:57 2021 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Tue, 5 Jan 2021 09:36:57 +0000 Subject: [Lazarus] FPDoc now with Markdown support In-Reply-To: <CADQ8pGLWAwMot9uwOPiYu8kDOnDi8Km47d==+LoM-M8pXMEbXA@mail.gmail.com> References: <CADQ8pGLWAwMot9uwOPiYu8kDOnDi8Km47d==+LoM-M8pXMEbXA@mail.gmail.com> Message-ID: <39fb78dc-191b-d611-2614-294245867e5b@geldenhuys.co.uk> On 03/01/2021 7:48 pm, Don Siders via lazarus wrote: >> I've been looking at allowing markdown for the description files (they would >> be less verbose then), but there seems to be no decent markdown parser available >> for pascal. If somone cares to contribute one... > Oh boy. I guess it is inevitable, but I don't think it's a > particularly good idea. > > I have no aversion to XML tagging. I don't mind its rigid nature > because it guarantees consistent, predictable input. > > Markdown is anarchy in my opinion, and you can't impose order on > anarchy. Markdown is great for readme or FAQ files. Not so great for a Agreed. Markdown and FPDoc's description syntax suffer the same problems. The syntax isn't rich enough, and thus falls back to using embedded HTML syntax (officially or unofficially) and mostly assumes that HTML with be the final generated format. This is not always the case. On the other hand AsciiDoc has a MUCH richer syntax and is equally intuitive to write because it too looks like plain text emails you would normally write. But it also has a much richer syntax that covers everything you need for documentation or technical articles (excluding formulas). Things like comments in syntax, include files, an actual specification, less "derived alternatives" (eg: Github Markdown, original Gruber markdown etc). There are many articles on the Internet going in much more detail describing the issues of Markdown. Yet like Windows, it seem still so popular. I have no idea why. Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp From michael at freepascal.org Tue Jan 5 10:47:10 2021 From: michael at freepascal.org (Michael Van Canneyt) Date: Tue, 5 Jan 2021 10:47:10 +0100 (CET) Subject: [Lazarus] FPDoc now with Markdown support In-Reply-To: <39fb78dc-191b-d611-2614-294245867e5b@geldenhuys.co.uk> References: <CADQ8pGLWAwMot9uwOPiYu8kDOnDi8Km47d==+LoM-M8pXMEbXA@mail.gmail.com> <39fb78dc-191b-d611-2614-294245867e5b@geldenhuys.co.uk> Message-ID: <alpine.DEB.2.22.394.2101051039210.436072@home> On Tue, 5 Jan 2021, Graeme Geldenhuys via lazarus wrote: > On 03/01/2021 7:48 pm, Don Siders via lazarus wrote: >>> I've been looking at allowing markdown for the description files (they would >>> be less verbose then), but there seems to be no decent markdown parser available >>> for pascal. If somone cares to contribute one... >> Oh boy. I guess it is inevitable, but I don't think it's a >> particularly good idea. >> >> I have no aversion to XML tagging. I don't mind its rigid nature >> because it guarantees consistent, predictable input. >> >> Markdown is anarchy in my opinion, and you can't impose order on >> anarchy. Markdown is great for readme or FAQ files. Not so great for a > > > Agreed. Markdown and FPDoc's description syntax suffer the same problems. The > syntax isn't rich enough, and thus falls back to using embedded HTML syntax > (officially or unofficially) and mostly assumes that HTML with be the > final generated format. This is not always the case. > > On the other hand AsciiDoc has a MUCH richer syntax and is equally > intuitive to write because it too looks like plain text emails you > would normally write. But it also has a much richer syntax that covers > everything you need for documentation or technical articles (excluding > formulas). Things like comments in syntax, include files, an actual > specification, less "derived alternatives" (eg: Github Markdown, original > Gruber markdown etc). Apart from AsciiDoc being equally intuitive, I agree with your statements. > There are many articles on the Internet going in much more detail > describing the issues of Markdown. Yet like Windows, it seem still so > popular. I have no idea why. Because people are naturally lazy and prefer easy & simple over strict & rich. Add to that time pressure imposed by deadlines, and there you have all the reasons why markdown is popular: great for quickly "mashing" some things together... Many of github README.md files are not even worth the trouble of writing them for all the use they offer. Basically the same reasons why my cat prefers the awful can food I give her over going out to hunt for her breakfast ;-) Michael. From mailinglists at geldenhuys.co.uk Tue Jan 5 16:08:52 2021 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Tue, 5 Jan 2021 15:08:52 +0000 Subject: [Lazarus] FPDoc now with Markdown support In-Reply-To: <alpine.DEB.2.22.394.2101051039210.436072@home> References: <CADQ8pGLWAwMot9uwOPiYu8kDOnDi8Km47d==+LoM-M8pXMEbXA@mail.gmail.com> <39fb78dc-191b-d611-2614-294245867e5b@geldenhuys.co.uk> <alpine.DEB.2.22.394.2101051039210.436072@home> Message-ID: <27df11bc-a590-5ab0-2eb1-b782a350045f@geldenhuys.co.uk> On 05/01/2021 9:47 am, Michael Van Canneyt via lazarus wrote: > Because people are naturally lazy and prefer easy & simple over strict & rich. Once again the simplest answer is always the one closest to the truth. :) > Basically the same reasons why my cat prefers the awful can food I give her over going > out to hunt for her breakfast ;-) Oh my one cat is so fussy, he now wonders the neighbourhood looking all cute and catches yet more suckers that will feed him something else. :-/ Regards, Graeme From juha.manninen62 at gmail.com Tue Jan 5 16:12:44 2021 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Tue, 5 Jan 2021 17:12:44 +0200 Subject: [Lazarus] Component-View Presets In-Reply-To: <CAPN1EhCHXJtMrfotdguf=R8wR50d5PGhRm8vvQOGOxw7SKh=0g@mail.gmail.com> References: <6779eb45-ef38-9613-f59b-cf9ed6c3adf3@gmail.com> <CAPN1EhCHXJtMrfotdguf=R8wR50d5PGhRm8vvQOGOxw7SKh=0g@mail.gmail.com> Message-ID: <CAPN1EhCeTzXFefmTcp=MubYVs8q_DckkvxRZ8z1SvJ2a-VTc_A@mail.gmail.com> In r64336 I made the selected tab (PageIndex) persistent. I also added a test for define NoComponentListTreeExpand. Build Lazarus with it and the trees will not open as expanded. The define can be replaced with a proper option if you find a good place for it. Please test. Juha -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20210105/3c7c5671/attachment.html> From ryansmithhe at gmail.com Tue Jan 5 16:22:04 2021 From: ryansmithhe at gmail.com (R.Smith) Date: Tue, 5 Jan 2021 17:22:04 +0200 Subject: [Lazarus] Component-View Presets In-Reply-To: <CAPN1EhCeTzXFefmTcp=MubYVs8q_DckkvxRZ8z1SvJ2a-VTc_A@mail.gmail.com> References: <6779eb45-ef38-9613-f59b-cf9ed6c3adf3@gmail.com> <CAPN1EhCHXJtMrfotdguf=R8wR50d5PGhRm8vvQOGOxw7SKh=0g@mail.gmail.com> <CAPN1EhCeTzXFefmTcp=MubYVs8q_DckkvxRZ8z1SvJ2a-VTc_A@mail.gmail.com> Message-ID: <edd6b1af-649c-780b-550f-e080b1f6a8b8@gmail.com> Awesome - thanks. Will get right on with testing and report back. On 2021/01/05 17:12, Juha Manninen via lazarus wrote: > In r64336 I made the selected tab (PageIndex) persistent. > I also added a test for define NoComponentListTreeExpand. Build > Lazarus with it and the trees will not open as expanded. The define > can be replaced with a proper option if you find a good place for it. > Please test. > > Juha > > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20210105/cfd121d2/attachment.html> From mailinglists at geldenhuys.co.uk Wed Jan 6 01:08:17 2021 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Wed, 6 Jan 2021 00:08:17 +0000 Subject: [Lazarus] FPDoc now with Markdown support In-Reply-To: <alpine.DEB.2.22.394.2101021508120.355988@home> References: <alpine.DEB.2.22.394.2101021508120.355988@home> Message-ID: <b09eb598-5984-4b65-510b-ed737ec07be4@geldenhuys.co.uk> On 02/01/2021 2:31 pm, Michael Van Canneyt via lazarus wrote: > material theme: > https://www.freepascal.org/~michael/docs-demo/material/system/tobject.dispatch/ There seems to be an issue generating constants and values with a underscore in the name. You can see that here: https://www.freepascal.org/~michael/docs-demo/material/baseunix/arg_max/ const ARG\_MAX = UnixType.ARG\_MAX instead of const ARG_MAX = UnixType.ARG_MAX Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp From mailinglists at geldenhuys.co.uk Wed Jan 6 01:23:55 2021 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Wed, 6 Jan 2021 00:23:55 +0000 Subject: [Lazarus] FPDoc now with Markdown support In-Reply-To: <alpine.DEB.2.22.394.2101021508120.355988@home> References: <alpine.DEB.2.22.394.2101021508120.355988@home> Message-ID: <dcfec443-1384-cea0-ad73-edb9bacf2561@geldenhuys.co.uk> On 02/01/2021 2:31 pm, Michael Van Canneyt via lazarus wrote: > Compare the official page for TObject.Dispatch: Looking at another class with more detail... Did you explicitly enable the functionality to generate Private, Protected fields and methods? Or does the Markdown writer possibly not check if those were meant to be hidden from the output. The reason I ask, is because above you mentioned "official", and I know in the official docs you don't generate private and protected methods and fields in the output[1]. This page shows private and protected fields and methods: https://www.freepascal.org/~michael/docs-demo/material/classes/tlist/ Regards, Graeme [1] https://www.freepascal.org/docs-html/rtl/classes/tlist.html From serbod at gmail.com Wed Jan 6 03:16:06 2021 From: serbod at gmail.com (Sergey Bodrov) Date: Wed, 6 Jan 2021 05:16:06 +0300 Subject: [Lazarus] FPDoc now with Markdown support In-Reply-To: <39fb78dc-191b-d611-2614-294245867e5b@geldenhuys.co.uk> References: <CADQ8pGLWAwMot9uwOPiYu8kDOnDi8Km47d==+LoM-M8pXMEbXA@mail.gmail.com> <39fb78dc-191b-d611-2614-294245867e5b@geldenhuys.co.uk> Message-ID: <CAEnbvRHaKmkzuSYWbccXPQneh-isLx-+=1dk5z8TbM2G65QEHQ@mail.gmail.com> > > There are many articles on the Internet going in much more detail > describing the issues of Markdown. Yet like Windows, it seem still so > popular. I have no idea why. > Wikipedia and hundreds of wiki sites (includes freepascal wiki). De-facto standard for updateable documentation. Main advantage in markdown, that it almost not uses closing tags for large blocks. So, no need to keep in mind whole document structure, no troubles with copy-paste and random edits. > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20210106/64c14965/attachment-0001.html> From michael at freepascal.org Wed Jan 6 07:58:52 2021 From: michael at freepascal.org (Michael Van Canneyt) Date: Wed, 6 Jan 2021 07:58:52 +0100 (CET) Subject: [Lazarus] FPDoc now with Markdown support In-Reply-To: <dcfec443-1384-cea0-ad73-edb9bacf2561@geldenhuys.co.uk> References: <alpine.DEB.2.22.394.2101021508120.355988@home> <dcfec443-1384-cea0-ad73-edb9bacf2561@geldenhuys.co.uk> Message-ID: <alpine.DEB.2.22.394.2101060758060.478366@home> On Wed, 6 Jan 2021, Graeme Geldenhuys via lazarus wrote: > On 02/01/2021 2:31 pm, Michael Van Canneyt via lazarus wrote: >> Compare the official page for TObject.Dispatch: > > Looking at another class with more detail... Did you explicitly enable > the functionality to generate Private, Protected fields and methods? > Or does the Markdown writer possibly not check if those were meant to > be hidden from the output. The latter. Thanks for pinting it out. Michael. From michael at freepascal.org Wed Jan 6 07:59:53 2021 From: michael at freepascal.org (Michael Van Canneyt) Date: Wed, 6 Jan 2021 07:59:53 +0100 (CET) Subject: [Lazarus] FPDoc now with Markdown support In-Reply-To: <b09eb598-5984-4b65-510b-ed737ec07be4@geldenhuys.co.uk> References: <alpine.DEB.2.22.394.2101021508120.355988@home> <b09eb598-5984-4b65-510b-ed737ec07be4@geldenhuys.co.uk> Message-ID: <alpine.DEB.2.22.394.2101060758570.478366@home> On Wed, 6 Jan 2021, Graeme Geldenhuys via lazarus wrote: > On 02/01/2021 2:31 pm, Michael Van Canneyt via lazarus wrote: >> material theme: >> https://www.freepascal.org/~michael/docs-demo/material/system/tobject.dispatch/ > > There seems to be an issue generating constants and values with a underscore > in the name. > > You can see that here: > > https://www.freepascal.org/~michael/docs-demo/material/baseunix/arg_max/ > > > const > ARG\_MAX = UnixType.ARG\_MAX > > instead of > > const > ARG_MAX = UnixType.ARG_MAX Hm. I'll need to check that. Seems I forgot to disable quoting for code blocks. Thanks !. Michael. From mailinglists at geldenhuys.co.uk Wed Jan 6 18:48:39 2021 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Wed, 6 Jan 2021 17:48:39 +0000 Subject: [Lazarus] FPDoc now with Markdown support In-Reply-To: <CAEnbvRHaKmkzuSYWbccXPQneh-isLx-+=1dk5z8TbM2G65QEHQ@mail.gmail.com> References: <CADQ8pGLWAwMot9uwOPiYu8kDOnDi8Km47d==+LoM-M8pXMEbXA@mail.gmail.com> <39fb78dc-191b-d611-2614-294245867e5b@geldenhuys.co.uk> <CAEnbvRHaKmkzuSYWbccXPQneh-isLx-+=1dk5z8TbM2G65QEHQ@mail.gmail.com> Message-ID: <2ff56481-364c-d341-872c-2206c57c14a0@geldenhuys.co.uk> Hi Sergey, [I've replied off the mailing list] On 06/01/2021 2:16 am, Sergey Bodrov via lazarus wrote: > Wikipedia and hundreds of wiki sites (includes freepascal wiki). De-facto > standard for updateable documentation. Markdown doesn't have any official (single) standard. Many versions exist all over the internet. Wikipedia differs from, Github, which differs from Gitlab, which differs from Grubber's original Markdown etc etc. It's a total hit and miss if what you type is going to generate what you expect. Yes, basic syntax like Bold, Italic etc works, but I'm talking about more advanced document syntax. > > Main advantage in markdown, that it almost not uses closing tags for large > blocks. So, no need to keep in mind whole document structure, no troubles > with copy-paste and random edits. Asciidoc is exactly the same, but it has an official syntax that everybody adheres too. It also has a much richer syntax that Markdown lacks. Off the top of my head: * comments inside your document that will not generate. Markdown doesn't have such support at all, and many recommend using HTML comments, but that only works if you were going to generate HTML output. What if I generate PDF's, TXT, IPF, MAN pages etc output. * Markdown also doesn't support: * Admonition * Sidebars * Block titles * includes files etc. All features very often used in documentation and books. * Note the HTML usage (again) for cross references in Markdown. AsciiDoc supports that seamlessly without reverting the embedded HTML. * Markdown doesn't support annotated code blocks (aka Callouts). Further info with a side-by-side comparisons can be seen here: https://docs.asciidoctor.org/asciidoc/latest/asciidoc-vs-markdown/ The official Asciidoc Users Guide: https://asciidoc.org/asciidoc.html Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp From mailinglists at geldenhuys.co.uk Wed Jan 6 19:04:20 2021 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Wed, 6 Jan 2021 18:04:20 +0000 Subject: [Lazarus] FPDoc now with Markdown support In-Reply-To: <2ff56481-364c-d341-872c-2206c57c14a0@geldenhuys.co.uk> References: <CADQ8pGLWAwMot9uwOPiYu8kDOnDi8Km47d==+LoM-M8pXMEbXA@mail.gmail.com> <39fb78dc-191b-d611-2614-294245867e5b@geldenhuys.co.uk> <CAEnbvRHaKmkzuSYWbccXPQneh-isLx-+=1dk5z8TbM2G65QEHQ@mail.gmail.com> <2ff56481-364c-d341-872c-2206c57c14a0@geldenhuys.co.uk> Message-ID: <7ae4a00c-67de-4fa4-e43a-67003e1894cd@geldenhuys.co.uk> On 06/01/2021 5:48 pm, Graeme Geldenhuys via lazarus wrote: > Hi Sergey, > > [I've replied off the mailing list] Apologies, my stupid email client replaced the TO name, but still went and sent it to the mailing list. :-( Regards, Graeme From svaa at ciberpiula.net Thu Jan 7 10:49:18 2021 From: svaa at ciberpiula.net (Santiago A.) Date: Thu, 7 Jan 2021 10:49:18 +0100 Subject: [Lazarus] FPDoc now with Markdown support In-Reply-To: <alpine.DEB.2.22.394.2101051039210.436072@home> References: <CADQ8pGLWAwMot9uwOPiYu8kDOnDi8Km47d==+LoM-M8pXMEbXA@mail.gmail.com> <39fb78dc-191b-d611-2614-294245867e5b@geldenhuys.co.uk> <alpine.DEB.2.22.394.2101051039210.436072@home> Message-ID: <10e7fea8-d3a9-e9be-62d6-789e36ed0c4d@ciberpiula.net> El 05/01/2021 a las 10:47, Michael Van Canneyt via lazarus escribió: > > Because people are naturally lazy and prefer easy & simple over strict > & rich. > But we could chose a language that is easy & simple for when you want to do simple things (90% time) and rich when you need to do complex things. Asciidoc is very easy, but more standarized, and very rich if you need to to do complex things. if markdown is to be used, it should be specified which flavor, not just "markdown" https://github.com/commonmark/commonmark-spec/wiki/Markdown-Flavors if we are going for markdown (wouldn't be my first choice) I would go for Github flavor https://docs.github.com/en/free-pro-team at latest/github/writing-on-github Once again, I would prefer Asciidoc -- Saludos Santiago A. From michael at freepascal.org Thu Jan 7 12:24:48 2021 From: michael at freepascal.org (Michael Van Canneyt) Date: Thu, 7 Jan 2021 12:24:48 +0100 (CET) Subject: [Lazarus] FPDoc now with Markdown support In-Reply-To: <10e7fea8-d3a9-e9be-62d6-789e36ed0c4d@ciberpiula.net> References: <CADQ8pGLWAwMot9uwOPiYu8kDOnDi8Km47d==+LoM-M8pXMEbXA@mail.gmail.com> <39fb78dc-191b-d611-2614-294245867e5b@geldenhuys.co.uk> <alpine.DEB.2.22.394.2101051039210.436072@home> <10e7fea8-d3a9-e9be-62d6-789e36ed0c4d@ciberpiula.net> Message-ID: <alpine.DEB.2.22.394.2101071214080.521746@home> On Thu, 7 Jan 2021, Santiago A. via lazarus wrote: > El 05/01/2021 a las 10:47, Michael Van Canneyt via lazarus escribió: >> >> Because people are naturally lazy and prefer easy & simple over strict >> & rich. >> > > But we could chose a language that is easy & simple for when you want to > do simple things (90% time) and rich when you need to do complex things. > Asciidoc is very easy, but more standarized, and very rich if you need > to to do complex things. > > if markdown is to be used, it should be specified which flavor, not just > "markdown" > https://github.com/commonmark/commonmark-spec/wiki/Markdown-Flavors > > if we are going for markdown (wouldn't be my first choice) I would go > for Github flavor > https://docs.github.com/en/free-pro-team at latest/github/writing-on-github > > Once again, I would prefer Asciidoc Anyone is free to propose an FPDoc importer for AsciiDoc, MarkDown (insert flavour of the month), ReStructuredText. All it needs to do is convert the given format to fpdoc format, which will then be processed by fpdoc in the usual manner. As I said, I do not plan to switch the existing documentation format to markdown or any other format. The idea is simply to make writing documentation easier for other users. I mentioned Markdown because I need it myself for work, so if I decide to work on it, it will be markdown. In the original "Gruber" format, since that is what mkdocs uses, and from first glances the used Python parser is very simple, straightforward and extensible. The best I've seen yet. Michael. From mailinglists at geldenhuys.co.uk Thu Jan 7 13:22:43 2021 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 7 Jan 2021 12:22:43 +0000 Subject: [Lazarus] FPDoc now with Markdown support In-Reply-To: <10e7fea8-d3a9-e9be-62d6-789e36ed0c4d@ciberpiula.net> References: <CADQ8pGLWAwMot9uwOPiYu8kDOnDi8Km47d==+LoM-M8pXMEbXA@mail.gmail.com> <39fb78dc-191b-d611-2614-294245867e5b@geldenhuys.co.uk> <alpine.DEB.2.22.394.2101051039210.436072@home> <10e7fea8-d3a9-e9be-62d6-789e36ed0c4d@ciberpiula.net> Message-ID: <8c81c0b9-d43c-b655-3133-74997d4b44bf@geldenhuys.co.uk> On 07/01/2021 9:49 am, Santiago A. via lazarus wrote: > https://github.com/commonmark/commonmark-spec/wiki/Markdown-Flavors Wow, I knew about a few variations, but I didn't know there was that many. It's worse than I thought. Regards, Graeme From rolf.wetjen at mail.de Fri Jan 8 09:58:15 2021 From: rolf.wetjen at mail.de (Rolf Wetjen) Date: Fri, 8 Jan 2021 09:58:15 +0100 Subject: [Lazarus] Update to help documentation Message-ID: <103915c8-fbee-4516-3c62-38036a3a5a73@mail.de> I've a small update for the help files masks.xml and maskedit.xml. How can I share it to the project? Regards, Rolf From pascaldragon at googlemail.com Fri Jan 8 10:17:26 2021 From: pascaldragon at googlemail.com (Sven Barth) Date: Fri, 8 Jan 2021 10:17:26 +0100 Subject: [Lazarus] Update to help documentation In-Reply-To: <103915c8-fbee-4516-3c62-38036a3a5a73@mail.de> References: <103915c8-fbee-4516-3c62-38036a3a5a73@mail.de> Message-ID: <CAFMUeB-M+MTPMFkmCh24ZrUxw_GGoXYaJ4feWj+d=EBrukUGRg@mail.gmail.com> Rolf Wetjen via lazarus <lazarus at lists.lazarus-ide.org> schrieb am Fr., 8. Jan. 2021, 09:58: > I've a small update for the help files masks.xml and maskedit.xml. > > How can I share it to the project? > Best provide patches in a bug report on https://bugs.freepascal.org/ for the Lazarus project. Regards, Sven > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20210108/f662bf15/attachment.html> From juha.manninen62 at gmail.com Sun Jan 10 13:29:41 2021 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Sun, 10 Jan 2021 14:29:41 +0200 Subject: [Lazarus] Profiling with Valgrind and KCacheGrind Message-ID: <CAPN1EhCjKBxSuEFaN9PR=oqSCY0hVn4v=-0q1=sUX+uzomf4Ew@mail.gmail.com> I am profiling and optimizing code in Lazarus IDE. Valgrind profiler + KCacheGrind visualizer tool make a very nice combination. A picture of KCacheGrind in real action : https://photos.app.goo.gl/YGn3uiNgciWPKSGx7 KCacheGrind is part of KDE project and thus integrates well with KDE Plasma desktop. Its authors have clearly profiled and optimized their own project. It opens super-fast although it processes megabytes of complex data and draws fancy graphics. Wow! There are lists for callers and callees. Data can be sorted by cumulative time, self time, number of calls, caller's distance from the function etc. Playing with it gives a good view of what is going on, and sometimes unexpected surprises. Usage instructions : https://wiki.freepascal.org/Profiling#Using_Valgrind.2FCallgrind KCacheGrind opens by clicking the default output file, at least with my KDE + Dolphin. No need to generate any human readable text files. KCacheGrind makes it human readable. I built Lazarus with "-gw3 -gl -gv" Martin builds without debug info with optimization. I will do the same thing. Optimization does not do harm for profiling as it does for debugging. -gv is the important flag for Valgrind profiler. Recommended! Juha -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20210110/5b135565/attachment.html> From octopushole at gmail.com Mon Jan 11 20:32:52 2021 From: octopushole at gmail.com (duilio foschi) Date: Mon, 11 Jan 2021 20:32:52 +0100 Subject: [Lazarus] UDP server In-Reply-To: <20201227221107.7be4ca62@limapholos.matflo.wg> References: <20200711110543.3898a51e@limapholos.matflo.wg> <20201227221107.7be4ca62@limapholos.matflo.wg> Message-ID: <CABkiRz_QpRwPwFrbNQS_EP27pZiMwe-sNwiQU7SwerbxU2MnVw@mail.gmail.com> http://www.ararat.cz/synapse/doku.php/public:howto:udpserver this is the code suggested to write a UDP server with synapse. The code uses an infinite loop in a thread. I find this solution rather ugly. I would expect an event OnReceiveData that apparently is not there. The socket allows for a callback procedure of type procedure OnStatus(Sender: TObject; Reason: THookSocketReason; const Value: string); However it seems that this callback only works when the command RecvPacket or similar is issued and as far as the relative timeout does not elapse. Do I understand well? There is now way to use an event to collect data in synapse? An infinite loop is the only way? I miss old ICS (Internet Component Suite) :) Thank you Peppe Polpo -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20210111/125271e7/attachment.html> From mailinglists at geldenhuys.co.uk Tue Jan 12 01:39:13 2021 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Tue, 12 Jan 2021 00:39:13 +0000 Subject: [Lazarus] UDP server In-Reply-To: <CABkiRz_QpRwPwFrbNQS_EP27pZiMwe-sNwiQU7SwerbxU2MnVw@mail.gmail.com> References: <20200711110543.3898a51e@limapholos.matflo.wg> <20201227221107.7be4ca62@limapholos.matflo.wg> <CABkiRz_QpRwPwFrbNQS_EP27pZiMwe-sNwiQU7SwerbxU2MnVw@mail.gmail.com> Message-ID: <69416ca0-2d3f-d372-7791-b453ec5a88bb@geldenhuys.co.uk> On 11/01/2021 7:32 pm, duilio foschi via lazarus wrote: > I miss old ICS (Internet Component Suite) :) Have you tried looking at Indy components? I've used them for years with great success. Regards, Graeme From corpsman at web.de Tue Jan 12 08:28:53 2021 From: corpsman at web.de (Corpsman) Date: Tue, 12 Jan 2021 08:28:53 +0100 Subject: [Lazarus] UDP server In-Reply-To: <69416ca0-2d3f-d372-7791-b453ec5a88bb@geldenhuys.co.uk> References: <20200711110543.3898a51e@limapholos.matflo.wg> <20201227221107.7be4ca62@limapholos.matflo.wg> <CABkiRz_QpRwPwFrbNQS_EP27pZiMwe-sNwiQU7SwerbxU2MnVw@mail.gmail.com> <69416ca0-2d3f-d372-7791-b453ec5a88bb@geldenhuys.co.uk> Message-ID: <f4fbf86f-a9a8-af74-fc66-aa56c734f77d@web.de> I use the lnet lib which can be easily installed with the online package manager works great with tcp and udp and has onReceived events ;) On 1/12/21 1:39 AM, Graeme Geldenhuys via lazarus wrote: > On 11/01/2021 7:32 pm, duilio foschi via lazarus wrote: >> I miss old ICS (Internet Component Suite) :) > Have you tried looking at Indy components? I've used them for years > with great success. > > > Regards, > Graeme -- Auf meiner Homepage www.Corpsman.de ist immer was los, ständig wird sie aktualisiert und erweitert. Da ist für jeden was dabei. -- Schütze deine Privatsphäre, nutze E-mail Verschlüsselung. Wie das geht steht z.B. hier : https://support.mozilla.org/en-US/kb/digitally-signing-and-encrypting-messages#w_installing-gpg-and-enigmail From bo.berglund at gmail.com Tue Jan 12 20:31:50 2021 From: bo.berglund at gmail.com (Bo Berglund) Date: Tue, 12 Jan 2021 20:31:50 +0100 Subject: [Lazarus] UDP server References: <20200711110543.3898a51e@limapholos.matflo.wg> <20201227221107.7be4ca62@limapholos.matflo.wg> <CABkiRz_QpRwPwFrbNQS_EP27pZiMwe-sNwiQU7SwerbxU2MnVw@mail.gmail.com> Message-ID: <c5urvf5c803m471r1t5udgcmecqkdesfnq@4ax.com> On Mon, 11 Jan 2021 20:32:52 +0100, duilio foschi via lazarus <lazarus at lists.lazarus-ide.org> wrote: > >Peppe Polpo Please do not start a new thread by using an old thread and changing the subject and content! It messes up message threading in newsreaders and email clients, which use a hidden "thread" identifier of sorts... -- Bo Berglund Developer in Sweden From octopushole at gmail.com Tue Jan 12 22:14:47 2021 From: octopushole at gmail.com (duilio foschi) Date: Tue, 12 Jan 2021 22:14:47 +0100 Subject: [Lazarus] UDP server In-Reply-To: <c5urvf5c803m471r1t5udgcmecqkdesfnq@4ax.com> References: <20200711110543.3898a51e@limapholos.matflo.wg> <20201227221107.7be4ca62@limapholos.matflo.wg> <CABkiRz_QpRwPwFrbNQS_EP27pZiMwe-sNwiQU7SwerbxU2MnVw@mail.gmail.com> <c5urvf5c803m471r1t5udgcmecqkdesfnq@4ax.com> Message-ID: <CABkiRz9BO1iW9rDJqhzUh87gRZ-17Wp6MoTm1+tutR8VdTRGLQ@mail.gmail.com> Oops! Sorry On Tue, Jan 12, 2021, 20:32 Bo Berglund via lazarus < lazarus at lists.lazarus-ide.org> wrote: > On Mon, 11 Jan 2021 20:32:52 +0100, duilio foschi via lazarus > <lazarus at lists.lazarus-ide.org> wrote: > > > >Peppe Polpo > > Please do not start a new thread by using an old thread and changing the > subject > and content! > It messes up message threading in newsreaders and email clients, which use > a > hidden "thread" identifier of sorts... > > > -- > Bo Berglund > Developer in Sweden > > -- > _______________________________________________ > lazarus mailing list > lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20210112/d257cfbf/attachment.html> From andrey.sobol.nn at gmail.com Fri Jan 15 08:53:52 2021 From: andrey.sobol.nn at gmail.com (=?utf-8?B?0KHQvtCx0L7Qu9GMINCQ0L3QtNGA0LXQuSDQldCy0LPQtdC90YzQtdCy0LjRhw==?=) Date: Fri, 15 Jan 2021 10:53:52 +0300 Subject: [Lazarus] FPDoc chms and code examples In-Reply-To: <dcfec443-1384-cea0-ad73-edb9bacf2561@geldenhuys.co.uk> References: <alpine.DEB.2.22.394.2101021508120.355988@home> <dcfec443-1384-cea0-ad73-edb9bacf2561@geldenhuys.co.uk> Message-ID: <8E48F7B0CAE447FAA15463C3148B2E61@infogroup.ru> Hello, I see that nobody used to a tag <examples> for creating documentation lcl, lazutil. That tag is used only the fpc team. I have read a documentation and saw rtl .xml`s and so. I want to create a directory for used examples of code as : - lazarus/doc/exlcl - lazarus/doc/exlazutil and put inside files in notation with dots. For example: fileutil.findallfiles.pas (I think it will be convenient) + readme.txt (into those directories) + wiki descriptions about it. I have checked it, a html`s works and a chm`s too. What is yours opinion about it? And how to create directory, also by patch? Andrey Sobol. -- Это сообщение было проверено AVG на наличие вирусов. http://www.avg.com From octopushole at gmail.com Fri Jan 15 13:06:16 2021 From: octopushole at gmail.com (duilio foschi) Date: Fri, 15 Jan 2021 13:06:16 +0100 Subject: [Lazarus] question with IDE Message-ID: <CABkiRz9MtHiGxE2kvgwNuKZD+hy4UEZo8Dkh0se=tHrDxfUH3A@mail.gmail.com> my IDE sometimes decides that procedure X was not coded in the implementation section of a unit...and adds an empty definition (see: https://imgur.com/awP7cK2) The procedure is there (see https://imgur.com/6H5F2cG) but for some reason the IDE is brought to the crazy idea above. This always happens with a couple of procedures, always the same. Is there a way to avoid this weird behaviour? Thank you Peppe Polpo -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20210115/5bfba739/attachment.html> From pascal at riekenberg.eu Fri Jan 15 13:23:32 2021 From: pascal at riekenberg.eu (Pascal Riekenberg) Date: Fri, 15 Jan 2021 13:23:32 +0100 (CET) Subject: [Lazarus] question with IDE In-Reply-To: <CABkiRz9MtHiGxE2kvgwNuKZD+hy4UEZo8Dkh0se=tHrDxfUH3A@mail.gmail.com> References: <CABkiRz9MtHiGxE2kvgwNuKZD+hy4UEZo8Dkh0se=tHrDxfUH3A@mail.gmail.com> Message-ID: <1998312696.7877.1610713413535@ox.hosteurope.de> Your existing implementation is missing the Paramter. Maybe that is the reason. Pascal > duilio foschi via lazarus <lazarus at lists.lazarus-ide.org> hat am 15.01.2021 13:06 geschrieben: > > > my IDE sometimes decides that procedure X was not coded in the implementation section of a unit...and adds an empty definition > (see: https://imgur.com/awP7cK2) > > The procedure is there (see https://imgur.com/6H5F2cG) but for some reason the IDE is brought to the crazy idea above. > > This always happens with a couple of procedures, always the same. > > Is there a way to avoid this weird behaviour? > > Thank you > > Peppe Polpo > -- > _______________________________________________ > lazarus mailing list > lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20210115/b0eb8cdc/attachment.html> From nc-gaertnma at netcologne.de Fri Jan 15 13:34:47 2021 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Fri, 15 Jan 2021 13:34:47 +0100 Subject: [Lazarus] question with IDE In-Reply-To: <CABkiRz9MtHiGxE2kvgwNuKZD+hy4UEZo8Dkh0se=tHrDxfUH3A@mail.gmail.com> References: <CABkiRz9MtHiGxE2kvgwNuKZD+hy4UEZo8Dkh0se=tHrDxfUH3A@mail.gmail.com> Message-ID: <20210115133447.5292f382@limapholos.matflo.wg> On Fri, 15 Jan 2021 13:06:16 +0100 duilio foschi via lazarus <lazarus at lists.lazarus-ide.org> wrote: > my IDE sometimes decides that procedure X was not coded in the > implementation section of a unit...and adds an empty definition > (see: https://imgur.com/awP7cK2) > > The procedure is there (see https://imgur.com/6H5F2cG) but for some > reason the IDE is brought to the crazy idea above. Do you have a complete example unit (you can strip the statements and vars)? Do you use IFDEFs? Mattias From bartjunk64 at gmail.com Fri Jan 15 16:51:45 2021 From: bartjunk64 at gmail.com (Bart) Date: Fri, 15 Jan 2021 16:51:45 +0100 Subject: [Lazarus] question with IDE In-Reply-To: <20210115133447.5292f382@limapholos.matflo.wg> References: <CABkiRz9MtHiGxE2kvgwNuKZD+hy4UEZo8Dkh0se=tHrDxfUH3A@mail.gmail.com> <20210115133447.5292f382@limapholos.matflo.wg> Message-ID: <CAMye31zvN=EO-9dmDJGcNqWxTbTUpY2x-epQnoL2imhTe=Ftug@mail.gmail.com> On Fri, Jan 15, 2021 at 1:34 PM Mattias Gaertner via lazarus <lazarus at lists.lazarus-ide.org> wrote: > Do you have a complete example unit (you can strip the statements and > vars)? I recently had this with fpc's deque.pp unit. I added two methods to the intrface, then pressed Ctrl+C and it made those two, but also a new empty implementation of TDeque.IncreaseCapacity method (which already existst). It's a generic class, if that matters at all. -- Bart From lazarus at mfriebe.de Fri Jan 15 17:00:35 2021 From: lazarus at mfriebe.de (Martin Frb) Date: Fri, 15 Jan 2021 17:00:35 +0100 Subject: [Lazarus] question with IDE In-Reply-To: <CAMye31zvN=EO-9dmDJGcNqWxTbTUpY2x-epQnoL2imhTe=Ftug@mail.gmail.com> References: <CABkiRz9MtHiGxE2kvgwNuKZD+hy4UEZo8Dkh0se=tHrDxfUH3A@mail.gmail.com> <20210115133447.5292f382@limapholos.matflo.wg> <CAMye31zvN=EO-9dmDJGcNqWxTbTUpY2x-epQnoL2imhTe=Ftug@mail.gmail.com> Message-ID: <cb57dbcc-f7db-177f-6cce-ce48b2904858@mfriebe.de> On 15/01/2021 16:51, Bart via lazarus wrote: > I recently had this with fpc's deque.pp unit. > I added two methods to the intrface, then pressed Ctrl+C and it made > those two, but also a new empty implementation of > TDeque.IncreaseCapacity method (which already existst). > It's a generic class, if that matters at all. Just for reference: A similar report exists here: https://forum.lazarus.freepascal.org/index.php/topic,47593.0.html From lazarus at kluug.net Fri Jan 15 17:15:36 2021 From: lazarus at kluug.net (Ondrej Pokorny) Date: Fri, 15 Jan 2021 17:15:36 +0100 Subject: [Lazarus] question with IDE In-Reply-To: <20210115133447.5292f382@limapholos.matflo.wg> References: <CABkiRz9MtHiGxE2kvgwNuKZD+hy4UEZo8Dkh0se=tHrDxfUH3A@mail.gmail.com> <20210115133447.5292f382@limapholos.matflo.wg> Message-ID: <24d9a3f2-9140-00d6-b85f-8afe9f97c234@kluug.net> On 15.01.2021 13:34, Mattias Gaertner via lazarus wrote: > Do you have a complete example unit (you can strip the statements and > vars)? See the attachment for two example units - obviously I cannot guarantee it is the same scenario that duilio experiences but it is definitely an example of Ctrl+Shift+C generating a duplicate method. In general: if you delete a method A and add a method B to the interface whereas A and B are of different types ("class constructor" vs "constructor" vs "procedure/function") you get a duplicate. I have known about this bug for a long time but have been too lazy to fix it :( > Do you use IFDEFs? No. Ondrej -------------- next part -------------- unit Unit1; {$mode objfpc} interface type TMyClass = class public procedure DoClick(Sender: TObject); end; implementation { TMyClass } constructor TMyClass.Create; begin inherited Create; Writeln('Create'); end; end. -------------- next part -------------- unit Unit2; {$mode objfpc} interface type TMyClass = class public class constructor Create; end; implementation { TMyClass } constructor TMyClass.Create; begin inherited Create; Writeln('Create'); end; end. From serbod at gmail.com Sat Jan 16 11:48:07 2021 From: serbod at gmail.com (Sergey Bodrov) Date: Sat, 16 Jan 2021 13:48:07 +0300 Subject: [Lazarus] FPDoc chms and code examples In-Reply-To: <8E48F7B0CAE447FAA15463C3148B2E61@infogroup.ru> References: <alpine.DEB.2.22.394.2101021508120.355988@home> <dcfec443-1384-cea0-ad73-edb9bacf2561@geldenhuys.co.uk> <8E48F7B0CAE447FAA15463C3148B2E61@infogroup.ru> Message-ID: <CAEnbvRGcA9v32kgvRF+Js2-OCqHmyCmnA4iFTpR-KTRELb4G1w@mail.gmail.com> Me personally prefer to place short code snippets into help pages, with some syntax highlight. Also, big code samples can be made as separate help (html) files, with detailed description. Same as in Wiki. Pure code examples can be found in lazarus/examples directory, they even have browser, embedded in IDE (create progect, browse samples). On Fri, Jan 15, 2021, 10:53 Соболь Андрей Евгеньевич via lazarus < lazarus at lists.lazarus-ide.org> wrote: > Hello, > I see that nobody used to a tag <examples> for creating documentation lcl, > lazutil. That tag is used only the fpc team. > I have read a documentation and saw rtl .xml`s and so. > I want to create a directory for used examples of code as : > > - lazarus/doc/exlcl > - lazarus/doc/exlazutil > > and put inside files in notation with dots. For example: > fileutil.findallfiles.pas (I think it will be convenient) > > + readme.txt (into those directories) > + wiki descriptions about it. > > I have checked it, a html`s works and a chm`s too. > > What is yours opinion about it? > And how to create directory, also by patch? > > Andrey Sobol. > > > -- > Это сообщение было проверено AVG на наличие вирусов. > http://www.avg.com > > -- > _______________________________________________ > lazarus mailing list > lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20210116/6fe0b3a4/attachment-0001.html> From octopushole at gmail.com Sat Jan 16 11:54:26 2021 From: octopushole at gmail.com (duilio foschi) Date: Sat, 16 Jan 2021 11:54:26 +0100 Subject: [Lazarus] using TDBNavigator with a TStringgrid Message-ID: <CABkiRz8aDFxVEjY-22A83ur3Ny3vwzeK=YjBE6FM1LTf-nFN_w@mail.gmail.com> it does not seem possible. Any workaround? Thank you Duilio -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20210116/cab88bfb/attachment.html> From gabor at poczta.onet.pl Sat Jan 16 12:00:12 2021 From: gabor at poczta.onet.pl (gabor) Date: Sat, 16 Jan 2021 12:00:12 +0100 Subject: [Lazarus] using TDBNavigator with a TStringgrid In-Reply-To: <CABkiRz8aDFxVEjY-22A83ur3Ny3vwzeK=YjBE6FM1LTf-nFN_w@mail.gmail.com> References: <CABkiRz8aDFxVEjY-22A83ur3Ny3vwzeK=YjBE6FM1LTf-nFN_w@mail.gmail.com> Message-ID: <4ea7f050-0d7e-995f-84c3-acdbc11fec7a@poczta.onet.pl> W dniu 2021-01-16 o 11:54, duilio foschi via lazarus pisze: > it does not seem possible. > > Any workaround? > > Thank you > > Duilio > Maybe TMemDataset + TDBGrid + TDBNavigator? Michał. From andrey.sobol.nn at gmail.com Sat Jan 16 12:03:25 2021 From: andrey.sobol.nn at gmail.com (Andrey Sobol) Date: Sat, 16 Jan 2021 14:03:25 +0300 Subject: [Lazarus] FPDoc chms and code examples In-Reply-To: <CAEnbvRGcA9v32kgvRF+Js2-OCqHmyCmnA4iFTpR-KTRELb4G1w@mail.gmail.com> References: <alpine.DEB.2.22.394.2101021508120.355988@home> <dcfec443-1384-cea0-ad73-edb9bacf2561@geldenhuys.co.uk> <8E48F7B0CAE447FAA15463C3148B2E61@infogroup.ru> <CAEnbvRGcA9v32kgvRF+Js2-OCqHmyCmnA4iFTpR-KTRELb4G1w@mail.gmail.com> Message-ID: <4a2c7a24-f3ff-79a1-8bfc-eabc8414523a@gmail.com> I opened the topic about short code examples that should be embedded in the documentation. About the full examples I know. Also I and Trevor have wrote a readme.txt file for those directories: The file you can read here: https://drive.google.com/file/d/1wHiM-UMClcjvmBLj1PQDwwQ4sNKdXl79/view?usp=sharing > Me personally prefer to place short code snippets into help pages, with > some syntax highlight. Also, big code samples can be made as separate help > (html) files, with detailed description. Same as in Wiki. > > Pure code examples can be found in lazarus/examples directory, they even > have browser, embedded in IDE (create project, browse samples). > > On Fri, Jan 15, 2021, 10:53 Andrey Sobol via lazarus < > lazarus at lists.lazarus-ide.org> wrote: > >> Hello, >> I see that nobody used to a tag <examples> for creating documentation lcl, >> lazutil. That tag is used only the fpc team. >> I have read a documentation and saw rtl .xml`s and so. >> I want to create a directory for used examples of code as : >> >> - lazarus/doc/exlcl >> - lazarus/doc/exlazutil >> >> and put inside files in notation with dots. For example: >> fileutil.findallfiles.pas (I think it will be convenient) >> >> + readme.txt (into those directories) >> + wiki descriptions about it. >> >> I have checked it, a html`s works and a chm`s too. >> >> What is yours opinion about it? >> And how to create directory, also by patch? >> >> Andrey Sobol.-- Andrey From andrey.sobol.nn at gmail.com Sat Jan 16 12:35:02 2021 From: andrey.sobol.nn at gmail.com (Andrey Sobol) Date: Sat, 16 Jan 2021 14:35:02 +0300 Subject: [Lazarus] FPDoc chms and code examples - second thread Message-ID: <264c83a1-ca7e-e25f-5aa1-b51734568e72@gmail.com> Oh sorry, I send my message into another thread :( I opened the topic about short code examples that should be embedded in the documentation. About the full examples I know. Also I and Trevor have wrote a readme.txt file for those directories: The file you can read here: https://drive.google.com/file/d/1wHiM-UMClcjvmBLj1PQDwwQ4sNKdXl79/view?usp=sharing > Me personally prefer to place short code snippets into help pages, with > some syntax highlight. Also, big code samples can be made as separate help > (html) files, with detailed description. Same as in Wiki. > > Pure code examples can be found in lazarus/examples directory, they even > have browser, embedded in IDE (create project, browse samples). > > On Fri, Jan 15, 2021, 10:53 Andrey Sobol via lazarus < > lazarus at lists.lazarus-ide.org> wrote: > >> Hello, >> I see that nobody used to a tag <examples> for creating documentation lcl, >> lazutil. That tag is used only the fpc team. >> I have read a documentation and saw rtl .xml`s and so. >> I want to create a directory for used examples of code as : >> >> - lazarus/doc/exlcl >> - lazarus/doc/exlazutil >> >> and put inside files in notation with dots. For example: >> fileutil.findallfiles.pas (I think it will be convenient) >> >> + readme.txt (into those directories) >> + wiki descriptions about it. >> >> I have checked it, a html`s works and a chm`s too. >> >> What is yours opinion about it? >> And how to create directory, also by patch? >> >> Andrey Sobol.-- Andrey -- Andrey From octopushole at gmail.com Sat Jan 16 13:13:43 2021 From: octopushole at gmail.com (duilio foschi) Date: Sat, 16 Jan 2021 13:13:43 +0100 Subject: [Lazarus] using TDBNavigator with a TStringgrid In-Reply-To: <4ea7f050-0d7e-995f-84c3-acdbc11fec7a@poczta.onet.pl> References: <CABkiRz8aDFxVEjY-22A83ur3Ny3vwzeK=YjBE6FM1LTf-nFN_w@mail.gmail.com> <4ea7f050-0d7e-995f-84c3-acdbc11fec7a@poczta.onet.pl> Message-ID: <CABkiRz_OR3C4XijU9NOOJOgb0tUJJDoeBeK+4fC4bsNd5xfwFw@mail.gmail.com> very good idea. Thank you On Sat, Jan 16, 2021 at 12:00 PM gabor via lazarus < lazarus at lists.lazarus-ide.org> wrote: > W dniu 2021-01-16 o 11:54, duilio foschi via lazarus pisze: > > it does not seem possible. > > > > Any workaround? > > > > Thank you > > > > Duilio > > > > Maybe TMemDataset + TDBGrid + TDBNavigator? > > Michał. > -- > _______________________________________________ > lazarus mailing list > lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20210116/d88812b5/attachment.html> From mailinglists at geldenhuys.co.uk Sat Jan 16 15:21:17 2021 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Sat, 16 Jan 2021 14:21:17 +0000 Subject: [Lazarus] FPDoc chms and code examples In-Reply-To: <8E48F7B0CAE447FAA15463C3148B2E61@infogroup.ru> References: <alpine.DEB.2.22.394.2101021508120.355988@home> <dcfec443-1384-cea0-ad73-edb9bacf2561@geldenhuys.co.uk> <8E48F7B0CAE447FAA15463C3148B2E61@infogroup.ru> Message-ID: <316cb1e1-648f-3f04-f59e-2f5df6f0361d@geldenhuys.co.uk> On 15/01/2021 7:53 am, Соболь Андрей Евгеньевич via lazarus wrote: > I see that nobody used to a tag <examples> for creating documentation lcl, > lazutil. That tag is used only the fpc team. It seem to be a decision made by the Lazarus team. I've used the EXAMPLE tag for years with the tiOPF project as well, and very happy with the result. I only use in for small code snippets though, not full programs. tiOPF docs: https://sourceforge.net/p/tiopf/tiopf_docs/ci/master/tree/ tiOPF HTML doc with example code: http://geldenhuys.co.uk/tiopf/tiobject/ttiobject.dogetfieldbounds.html Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp From bo.berglund at gmail.com Sun Jan 17 08:45:58 2021 From: bo.berglund at gmail.com (Bo Berglund) Date: Sun, 17 Jan 2021 08:45:58 +0100 Subject: [Lazarus] TStaticText loses content at irregular intervals (Win 10) Message-ID: <r0q70ghp7fm4l3djb7vdglect8v423gc0m@4ax.com> Windows 10 Pro, Lazarus 2.0.10 (64 bit), Fpc 3.2.0 (64 bit) I have an application where I have a panel on the bottom of the main form. On this I have a number of controls like buttons etc. There are a set of TStaticText controls where I show the current value of some variables that are set from buttons. The application is a video editor and I snatch the position in the video through the buttons that save the value of current time in seconds and show these in the TStaticText containers. While doing this sometimes the values displayed for the next cut just disappear... It is the *content* of these TStaticText controls that blank out and the values disappear... When this happens I can return the values by simply moving the application form down so these controls disappear below the screen bottom edge and then pull the form up again. This repaints the content of the controls. What could be the reason for this and is there anything I can do to stop it from happening? -- Bo Berglund Developer in Sweden From bartjunk64 at gmail.com Sun Jan 17 15:45:35 2021 From: bartjunk64 at gmail.com (Bart) Date: Sun, 17 Jan 2021 15:45:35 +0100 Subject: [Lazarus] TStaticText loses content at irregular intervals (Win 10) In-Reply-To: <r0q70ghp7fm4l3djb7vdglect8v423gc0m@4ax.com> References: <r0q70ghp7fm4l3djb7vdglect8v423gc0m@4ax.com> Message-ID: <CAMye31w_vgmCGaV-r9o3C7toaOLvPhKvmRerEX_MJUxM14vj8w@mail.gmail.com> On Sun, Jan 17, 2021 at 8:46 AM Bo Berglund via lazarus <lazarus at lists.lazarus-ide.org> wrote: > is there anything I can do to stop it from > happening? The "stupid"way is to try and call Apllication.PrecessMessages after you update the text of that control. -- Bart From bo.berglund at gmail.com Sun Jan 17 18:18:57 2021 From: bo.berglund at gmail.com (Bo Berglund) Date: Sun, 17 Jan 2021 18:18:57 +0100 Subject: [Lazarus] TStaticText loses content at irregular intervals (Win 10) References: <r0q70ghp7fm4l3djb7vdglect8v423gc0m@4ax.com> <CAMye31w_vgmCGaV-r9o3C7toaOLvPhKvmRerEX_MJUxM14vj8w@mail.gmail.com> Message-ID: <5ur80g51auq1da1q4jg9gmi3g0brpu7d6p@4ax.com> On Sun, 17 Jan 2021 15:45:35 +0100, Bart via lazarus <lazarus at lists.lazarus-ide.org> wrote: >On Sun, Jan 17, 2021 at 8:46 AM Bo Berglund via lazarus ><lazarus at lists.lazarus-ide.org> wrote: > >> is there anything I can do to stop it from >> happening? > >The "stupid"way is to try and call Apllication.PrecessMessages after >you update the text of that control. Well, this does not happen as a response to my program actions... It is like this: I have clicked the buttons a number of times to define the clips. Every time the number appears as expected. Now I leave the application with the last clip defined in these controls to do something else outside the application. Then when I return to the application the TStaticText containers are visibly empty! This is never done in the program itself, it always updates the controls with a text representation of a number... But when the form is in this state not showing what is inside the controls I can just drag the form such that the part holding the controls is hidden outside of the screen and then pull it up again and voila! The text is again shown! It seems like the *visual representation* of the TStaticText containers is not persistent in all cases. -- Bo Berglund Developer in Sweden From bo.berglund at gmail.com Sun Jan 17 22:36:41 2021 From: bo.berglund at gmail.com (Bo Berglund) Date: Sun, 17 Jan 2021 22:36:41 +0100 Subject: [Lazarus] TStaticText loses content at irregular intervals (Win 10) References: <r0q70ghp7fm4l3djb7vdglect8v423gc0m@4ax.com> <CAMye31w_vgmCGaV-r9o3C7toaOLvPhKvmRerEX_MJUxM14vj8w@mail.gmail.com> <5ur80g51auq1da1q4jg9gmi3g0brpu7d6p@4ax.com> Message-ID: <k4b90gluhgbvmbtb55ss03mdmkaoudlrb6@4ax.com> On Sun, 17 Jan 2021 18:18:57 +0100, Bo Berglund via lazarus <lazarus at lists.lazarus-ide.org> wrote: >But when the form is in this state not showing what is inside the controls I can >just drag the form such that the part holding the controls is hidden outside of >the screen and then pull it up again and voila! The text is again shown! > >It seems like the *visual representation* of the TStaticText containers is not >persistent in all cases. > Now it happened again and this time I looked closer and found that not only has the text inside the TStaticText disappeared, but also its border. So the panel is empty where the controls should be. Again, moving that part of the form offscreen and then back in again restores the visibility... How very strange... -- Bo Berglund Developer in Sweden From steveg at nevets.com.au Mon Jan 18 02:30:25 2021 From: steveg at nevets.com.au (Steve Gatenby) Date: Mon, 18 Jan 2021 11:30:25 +1000 Subject: [Lazarus] TimeZone problem Message-ID: <c96eab36-fe6c-f0b5-e0ab-c3b1798840ab@nevets.com.au> Would anybody be able to point me to a solution for incorrect time reading ? I obviously have a configuration problem between System and FPC - any pointers much appreciated :) Lazarus 2.1.0 r64403 FPC 3.3.1 x86_64-linux-gtk2 Xubuntu 20.10 Desktop test fpc app -   WriteLn('Local time offset (minutes): ', GetLocalTimeOffset);   WriteLn('Local Time ', TimeToStr(Now), ' is UTC ', TimeToStr(LocalTimeToUniversal(Now))); outputs : Local time offset (minutes): 0 Local Time 01:23:20 is UTC 01:23:20 'timedatectl' in terminal - Local time: Mon 2021-01-18 11:24:21 AEST Universal time: Mon 2021-01-18 01:24:21 UTC RTC time: Mon 2021-01-18 01:24:21 Time zone: Australia/Brisbane (AEST, +1000) System clock synchronized: yes NTP service: active RTC in local TZ: no Thanks - SteveG From lazarus at kluug.net Mon Jan 18 12:30:03 2021 From: lazarus at kluug.net (Ondrej Pokorny) Date: Mon, 18 Jan 2021 12:30:03 +0100 Subject: [Lazarus] TimeZone problem In-Reply-To: <c96eab36-fe6c-f0b5-e0ab-c3b1798840ab@nevets.com.au> References: <c96eab36-fe6c-f0b5-e0ab-c3b1798840ab@nevets.com.au> Message-ID: <51ffec1e-3c37-6898-4ec2-d25832f92354@kluug.net> On 18.01.2021 02:30, Steve Gatenby via lazarus wrote: > Would anybody be able to point me to a solution for incorrect time > reading ? > > I obviously have a configuration problem between System and FPC - any > pointers much appreciated :) > > Lazarus 2.1.0 r64403 FPC 3.3.1 x86_64-linux-gtk2 Hello, the linux timezone information is loaded in file /trunk/rtl/unix/timezone.inc You should check the functions GetTimezoneFile and ReadTimezoneFile. Ondrej From octopushole at gmail.com Tue Jan 19 19:03:51 2021 From: octopushole at gmail.com (duilio foschi) Date: Tue, 19 Jan 2021 19:03:51 +0100 Subject: [Lazarus] debugging a CGI Message-ID: <CABkiRz8jjOgb_T069Hg8MjXw=PHGjwmM1DWbMgRba+VaSu+OdQ@mail.gmail.com> I would like to debug a CGI by tracing it in Lazarus IDE as a console application in windows. Is there a way to have the CGI read from standard input at start time? Thank you Duilio -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20210119/3494019e/attachment.html> From michael at freepascal.org Tue Jan 19 22:11:17 2021 From: michael at freepascal.org (Michael Van Canneyt) Date: Tue, 19 Jan 2021 22:11:17 +0100 (CET) Subject: [Lazarus] debugging a CGI In-Reply-To: <CABkiRz8jjOgb_T069Hg8MjXw=PHGjwmM1DWbMgRba+VaSu+OdQ@mail.gmail.com> References: <CABkiRz8jjOgb_T069Hg8MjXw=PHGjwmM1DWbMgRba+VaSu+OdQ@mail.gmail.com> Message-ID: <alpine.DEB.2.22.394.2101192210310.893259@home> On Tue, 19 Jan 2021, duilio foschi via lazarus wrote: > I would like to debug a CGI by tracing it in Lazarus IDE as a console > application in windows. > > Is there a way to have the CGI read from standard input at start time? I recommend to host your webmodule in a http server app, this will make debugging it a lot easier. Michael. From octopushole at gmail.com Tue Jan 19 22:14:37 2021 From: octopushole at gmail.com (duilio foschi) Date: Tue, 19 Jan 2021 22:14:37 +0100 Subject: [Lazarus] debugging a CGI In-Reply-To: <alpine.DEB.2.22.394.2101192210310.893259@home> References: <CABkiRz8jjOgb_T069Hg8MjXw=PHGjwmM1DWbMgRba+VaSu+OdQ@mail.gmail.com> <alpine.DEB.2.22.394.2101192210310.893259@home> Message-ID: <CABkiRz-PSH71WBEDXJWjjrQ7irzK6iGp5b5gzruN=vcHPJAqyw@mail.gmail.com> How can I trace the code then? On Tue, Jan 19, 2021, 22:11 Michael Van Canneyt via lazarus < lazarus at lists.lazarus-ide.org> wrote: > > > On Tue, 19 Jan 2021, duilio foschi via lazarus wrote: > > > I would like to debug a CGI by tracing it in Lazarus IDE as a console > > application in windows. > > > > Is there a way to have the CGI read from standard input at start time? > > I recommend to host your webmodule in a http server app, this will make > debugging it a lot easier. > > Michael. > -- > _______________________________________________ > lazarus mailing list > lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20210119/4f1354f5/attachment.html> From michael at freepascal.org Tue Jan 19 23:31:27 2021 From: michael at freepascal.org (Michael Van Canneyt) Date: Tue, 19 Jan 2021 23:31:27 +0100 (CET) Subject: [Lazarus] debugging a CGI In-Reply-To: <CABkiRz-PSH71WBEDXJWjjrQ7irzK6iGp5b5gzruN=vcHPJAqyw@mail.gmail.com> References: <CABkiRz8jjOgb_T069Hg8MjXw=PHGjwmM1DWbMgRba+VaSu+OdQ@mail.gmail.com> <alpine.DEB.2.22.394.2101192210310.893259@home> <CABkiRz-PSH71WBEDXJWjjrQ7irzK6iGp5b5gzruN=vcHPJAqyw@mail.gmail.com> Message-ID: <alpine.DEB.2.22.394.2101192329240.893339@home> On Tue, 19 Jan 2021, duilio foschi via lazarus wrote: > How can I trace the code then? It's a normal Lazarus application. You can just debug the application like any other. Start a 'HTTP server application' in lazarus, add your web module unit to it and run it. (you may need to add some more units or packages, in essence the same oneas as in your CGI application). Once done with debugging, you can simply compile the CGI and deploy it. Michael. > > On Tue, Jan 19, 2021, 22:11 Michael Van Canneyt via lazarus < > lazarus at lists.lazarus-ide.org> wrote: > >> >> >> On Tue, 19 Jan 2021, duilio foschi via lazarus wrote: >> >>> I would like to debug a CGI by tracing it in Lazarus IDE as a console >>> application in windows. >>> >>> Is there a way to have the CGI read from standard input at start time? >> >> I recommend to host your webmodule in a http server app, this will make >> debugging it a lot easier. >> >> Michael. >> -- >> _______________________________________________ >> lazarus mailing list >> lazarus at lists.lazarus-ide.org >> https://lists.lazarus-ide.org/listinfo/lazarus >> > From steveg at nevets.com.au Wed Jan 20 07:18:53 2021 From: steveg at nevets.com.au (Steve Gatenby) Date: Wed, 20 Jan 2021 16:18:53 +1000 Subject: [Lazarus] TimeZone problem In-Reply-To: <51ffec1e-3c37-6898-4ec2-d25832f92354@kluug.net> References: <c96eab36-fe6c-f0b5-e0ab-c3b1798840ab@nevets.com.au> <51ffec1e-3c37-6898-4ec2-d25832f92354@kluug.net> Message-ID: <0f1e23e6-2861-ec46-cb79-cb038c7dc793@nevets.com.au> On 18/1/21 9:30 pm, Ondrej Pokorny wrote: > On 18.01.2021 02:30, Steve Gatenby via lazarus wrote: >> Would anybody be able to point me to a solution for incorrect time >> reading ? >> >> I obviously have a configuration problem between System and FPC - any >> pointers much appreciated :) >> >> Lazarus 2.1.0 r64403 FPC 3.3.1 x86_64-linux-gtk2 > > Hello, > > the linux timezone information is loaded in file > /trunk/rtl/unix/timezone.inc > > You should check the functions GetTimezoneFile and ReadTimezoneFile. > > Ondrej > Thanks Ondrej (again) I have concluded -> no idea :) All seems to be reading correctly within fpc, just not calculating offsets as I would expect ? My workaround was to create a custom zoneinfo file and use that on my dev system. All working OK now, so will tentatively conclude is specific to my system configuration. Regards - SteveG From bo.berglund at gmail.com Wed Jan 20 11:03:02 2021 From: bo.berglund at gmail.com (Bo Berglund) Date: Wed, 20 Jan 2021 11:03:02 +0100 Subject: [Lazarus] debugging a CGI References: <CABkiRz8jjOgb_T069Hg8MjXw=PHGjwmM1DWbMgRba+VaSu+OdQ@mail.gmail.com> <alpine.DEB.2.22.394.2101192210310.893259@home> <CABkiRz-PSH71WBEDXJWjjrQ7irzK6iGp5b5gzruN=vcHPJAqyw@mail.gmail.com> <alpine.DEB.2.22.394.2101192329240.893339@home> Message-ID: <3nvf0ghbvf12lh4gu536jllfpbdl3ni0m2@4ax.com> On Tue, 19 Jan 2021 23:31:27 +0100 (CET), Michael Van Canneyt via lazarus <lazarus at lists.lazarus-ide.org> wrote: >Start a 'HTTP server application' in lazarus, add your web module unit to it >and run it. (you may need to add some more units or packages, in essence the >same oneas as in your CGI application). This is interesting to me too, but when I go to Project/New Project... then the list does *not* contain an entry "HTTP Server Application" So how exactly do I "start" such project in Lazarus? I have tested this with Lazarus 2.0.10/Fpc 3.2.0 on Windows 10 but I really need it on a Linux platform (Raspberry Pi). -- Bo Berglund Developer in Sweden From michael at freepascal.org Wed Jan 20 11:13:33 2021 From: michael at freepascal.org (Michael Van Canneyt) Date: Wed, 20 Jan 2021 11:13:33 +0100 (CET) Subject: [Lazarus] debugging a CGI In-Reply-To: <3nvf0ghbvf12lh4gu536jllfpbdl3ni0m2@4ax.com> References: <CABkiRz8jjOgb_T069Hg8MjXw=PHGjwmM1DWbMgRba+VaSu+OdQ@mail.gmail.com> <alpine.DEB.2.22.394.2101192210310.893259@home> <CABkiRz-PSH71WBEDXJWjjrQ7irzK6iGp5b5gzruN=vcHPJAqyw@mail.gmail.com> <alpine.DEB.2.22.394.2101192329240.893339@home> <3nvf0ghbvf12lh4gu536jllfpbdl3ni0m2@4ax.com> Message-ID: <alpine.DEB.2.22.394.2101201110450.910236@home> On Wed, 20 Jan 2021, Bo Berglund via lazarus wrote: > On Tue, 19 Jan 2021 23:31:27 +0100 (CET), Michael Van Canneyt via lazarus > <lazarus at lists.lazarus-ide.org> wrote: > >> Start a 'HTTP server application' in lazarus, add your web module unit to it >> and run it. (you may need to add some more units or packages, in essence the >> same oneas as in your CGI application). > > This is interesting to me too, but when I go to Project/New Project... > then the list does *not* contain an entry "HTTP Server Application" > > So how exactly do I "start" such project in Lazarus? > > I have tested this with Lazarus 2.0.10/Fpc 3.2.0 on Windows 10 but I really need > it on a Linux platform (Raspberry Pi). Do you have the weblaz package installed ? The "New project" type for 'HTTP server Application' is only available if you have that package installed. Michael. From lazarus at mfriebe.de Wed Jan 20 13:33:13 2021 From: lazarus at mfriebe.de (Martin Frb) Date: Wed, 20 Jan 2021 13:33:13 +0100 Subject: [Lazarus] debugging a CGI In-Reply-To: <CABkiRz8jjOgb_T069Hg8MjXw=PHGjwmM1DWbMgRba+VaSu+OdQ@mail.gmail.com> References: <CABkiRz8jjOgb_T069Hg8MjXw=PHGjwmM1DWbMgRba+VaSu+OdQ@mail.gmail.com> Message-ID: <af19afb4-a545-c4bd-287c-d367bad1a2c9@mfriebe.de> On 19/01/2021 19:03, duilio foschi via lazarus wrote: > I would like to debug a CGI by tracing it in Lazarus IDE as a console > application in windows. > > Is there a way to have the CGI read from standard input at start time? > I have not tried this, but you may try to debug it using gdbserver. Tools > Options > debugger: choose gdbserver  and if required change ip/port 127.0.0.1:1234 Now you can start your app on the console  (I am not sure what commandline gdbserver takes / please double check) DUMMY INSTRUCTION gdbserver -host ip:port  yourapp gdbserver will hold your app right at the start. Your app should be able to read and write to the console from which you started it. You can then start debugging in the IDE. Going one step further, if you are real lucky, you can put the above gdbserver line into a script, and actually run it as cgi in a webserver (if the webserver does not timeout/kill it) From octopushole at gmail.com Wed Jan 20 15:10:46 2021 From: octopushole at gmail.com (duilio foschi) Date: Wed, 20 Jan 2021 15:10:46 +0100 Subject: [Lazarus] debugging a CGI In-Reply-To: <af19afb4-a545-c4bd-287c-d367bad1a2c9@mfriebe.de> References: <CABkiRz8jjOgb_T069Hg8MjXw=PHGjwmM1DWbMgRba+VaSu+OdQ@mail.gmail.com> <af19afb4-a545-c4bd-287c-d367bad1a2c9@mfriebe.de> Message-ID: <CABkiRz_v9uM29A2WuxmjnDmL0AbhvFb8BGWAuMuP=NP8ZANVKQ@mail.gmail.com> I guess I will use conditional compilation. {$IFDEF WINDOWS} // this means I am debugging the CGI on my PC //read from file xxx.json {$else} // this means the CGI is in production on my linux server // read from stdin {$endif} Thank you for your help Duilio On Wed, Jan 20, 2021 at 1:33 PM Martin Frb via lazarus < lazarus at lists.lazarus-ide.org> wrote: > On 19/01/2021 19:03, duilio foschi via lazarus wrote: > > I would like to debug a CGI by tracing it in Lazarus IDE as a console > > application in windows. > > > > Is there a way to have the CGI read from standard input at start time? > > > > I have not tried this, but you may try to debug it using gdbserver. > > Tools > Options > debugger: choose gdbserver and if required change > ip/port 127.0.0.1:1234 > > Now you can start your app on the console (I am not sure what > commandline gdbserver takes / please double check) > DUMMY INSTRUCTION > gdbserver -host ip:port yourapp > > gdbserver will hold your app right at the start. > Your app should be able to read and write to the console from which you > started it. > You can then start debugging in the IDE. > > > Going one step further, if you are real lucky, you can put the above > gdbserver line into a script, and actually run it as cgi in a webserver > (if the webserver does not timeout/kill it) > -- > _______________________________________________ > lazarus mailing list > lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20210120/283c2915/attachment.html> From bo.berglund at gmail.com Fri Jan 22 09:05:45 2021 From: bo.berglund at gmail.com (Bo Berglund) Date: Fri, 22 Jan 2021 09:05:45 +0100 Subject: [Lazarus] debugging a CGI References: <CABkiRz8jjOgb_T069Hg8MjXw=PHGjwmM1DWbMgRba+VaSu+OdQ@mail.gmail.com> <alpine.DEB.2.22.394.2101192210310.893259@home> <CABkiRz-PSH71WBEDXJWjjrQ7irzK6iGp5b5gzruN=vcHPJAqyw@mail.gmail.com> <alpine.DEB.2.22.394.2101192329240.893339@home> <3nvf0ghbvf12lh4gu536jllfpbdl3ni0m2@4ax.com> <alpine.DEB.2.22.394.2101201110450.910236@home> Message-ID: <am1l0g1qqlts7tfmk872hpol85ukcgk0g9@4ax.com> On Wed, 20 Jan 2021 11:13:33 +0100 (CET), Michael Van Canneyt via lazarus <lazarus at lists.lazarus-ide.org> wrote: > > >On Wed, 20 Jan 2021, Bo Berglund via lazarus wrote: > >> On Tue, 19 Jan 2021 23:31:27 +0100 (CET), Michael Van Canneyt via lazarus >> <lazarus at lists.lazarus-ide.org> wrote: >> >>> Start a 'HTTP server application' in lazarus, add your web module unit to it >>> and run it. (you may need to add some more units or packages, in essence the >>> same oneas as in your CGI application). >> >> This is interesting to me too, but when I go to Project/New Project... >> then the list does *not* contain an entry "HTTP Server Application" >> >> So how exactly do I "start" such project in Lazarus? >> >> I have tested this with Lazarus 2.0.10/Fpc 3.2.0 on Windows 10 but I really need >> it on a Linux platform (Raspberry Pi). > >Do you have the weblaz package installed ? > >The "New project" type for 'HTTP server Application' is only available if you have that >package installed. > Thanks, that was the problem. The Weblaz package is deployed with the default installation but not actually installed in the IDE. When I did that it showed up in the alternatives for a new project! :) -- Bo Berglund Developer in Sweden From ryansmithhe at gmail.com Fri Jan 22 11:54:01 2021 From: ryansmithhe at gmail.com (R.Smith) Date: Fri, 22 Jan 2021 12:54:01 +0200 Subject: [Lazarus] Bump issue Message-ID: <7cdf8d11-42f7-c0df-dcba-db837270a354@gmail.com> Hi all, I would like to know how to bump an issue in the bug tracker and I'm asking here because I don't wish to irritate the devs. Essentially the issue has been solved last year October already, but not getting committed and closed, and I'm worried it won't make it into the next release, and I really need it. (I've patched locally for now but will revert to trunk on next release). https://bugs.freepascal.org/view.php?id=37849 LacaK found the solution and proposed a patch, and Juha Manninen asked that someone with commit rights to FPC commit it. The FPC committers probably do not read the Lazarus bugs, so it has not been done and closed. I wish to gently remind the FPC devs to please not forget to apply this. What is the optimal/correct way to do this? Thank you kindly, Ryan From michael at freepascal.org Fri Jan 22 22:56:00 2021 From: michael at freepascal.org (Michael Van Canneyt) Date: Fri, 22 Jan 2021 22:56:00 +0100 (CET) Subject: [Lazarus] Bump issue In-Reply-To: <7cdf8d11-42f7-c0df-dcba-db837270a354@gmail.com> References: <7cdf8d11-42f7-c0df-dcba-db837270a354@gmail.com> Message-ID: <alpine.DEB.2.22.394.2101222255310.1020599@home> Hi, I have some time this weekend, I will commit it. Michael. On Fri, 22 Jan 2021, R.Smith via lazarus wrote: > Hi all, > > I would like to know how to bump an issue in the bug tracker and I'm > asking here because I don't wish to irritate the devs. > > Essentially the issue has been solved last year October already, but not > getting committed and closed, and I'm worried it won't make it into the > next release, and I really need it. (I've patched locally for now but > will revert to trunk on next release). > > https://bugs.freepascal.org/view.php?id=37849 > > LacaK found the solution and proposed a patch, and Juha Manninen asked > that someone with commit rights to FPC commit it. The FPC committers > probably do not read the Lazarus bugs, so it has not been done and closed. > > I wish to gently remind the FPC devs to please not forget to apply this. > What is the optimal/correct way to do this? > > > Thank you kindly, > Ryan > > > -- > _______________________________________________ > lazarus mailing list > lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus > From bartjunk64 at gmail.com Fri Jan 22 22:55:05 2021 From: bartjunk64 at gmail.com (Bart) Date: Fri, 22 Jan 2021 22:55:05 +0100 Subject: [Lazarus] Bump issue In-Reply-To: <7cdf8d11-42f7-c0df-dcba-db837270a354@gmail.com> References: <7cdf8d11-42f7-c0df-dcba-db837270a354@gmail.com> Message-ID: <CAMye31wHe5v3m7OASaUT1WiV+=uYoAVMLyku_KKUk7m6XJerxw@mail.gmail.com> On Fri, Jan 22, 2021 at 11:54 AM R.Smith via lazarus <lazarus at lists.lazarus-ide.org> wrote: > I wish to gently remind the FPC devs to please not forget to apply this. > What is the optimal/correct way to do this? Ask on the fpc-devel mailinglist. Add a note to the bugtracker issue, so it will be on top again. -- Bart From fpc at pascalprogramming.org Fri Jan 22 22:58:42 2021 From: fpc at pascalprogramming.org (Marco van de Voort) Date: Fri, 22 Jan 2021 22:58:42 +0100 Subject: [Lazarus] Bump issue In-Reply-To: <alpine.DEB.2.22.394.2101222255310.1020599@home> References: <7cdf8d11-42f7-c0df-dcba-db837270a354@gmail.com> <alpine.DEB.2.22.394.2101222255310.1020599@home> Message-ID: <c5e38dd9-5ab8-a46f-cb01-62944ca83835@pascalprogramming.org> Op 2021-01-22 om 22:56 schreef Michael Van Canneyt via lazarus: > > > I have some time this weekend, I will commit it. Is it really a good idea to accept msec=1000 for TryEncodeTimeInterval in a general unit like Dateutils? From michael at freepascal.org Fri Jan 22 23:33:34 2021 From: michael at freepascal.org (Michael Van Canneyt) Date: Fri, 22 Jan 2021 23:33:34 +0100 (CET) Subject: [Lazarus] Bump issue In-Reply-To: <c5e38dd9-5ab8-a46f-cb01-62944ca83835@pascalprogramming.org> References: <7cdf8d11-42f7-c0df-dcba-db837270a354@gmail.com> <alpine.DEB.2.22.394.2101222255310.1020599@home> <c5e38dd9-5ab8-a46f-cb01-62944ca83835@pascalprogramming.org> Message-ID: <alpine.DEB.2.22.394.2101222331360.1020599@home> On Fri, 22 Jan 2021, Marco van de Voort via lazarus wrote: > > Op 2021-01-22 om 22:56 schreef Michael Van Canneyt via lazarus: >> >> >> I have some time this weekend, I will commit it. > > Is it really a good idea to accept msec=1000 for TryEncodeTimeInterval > in a general unit like Dateutils? I didn't say I would commit as-is :) I was not aware of this bugreport. The lazarus devs should move the issue to FPC if they see it's an FPC issue. (supposing they can, at least) Michael. From bo.berglund at gmail.com Sat Jan 23 00:18:37 2021 From: bo.berglund at gmail.com (Bo Berglund) Date: Sat, 23 Jan 2021 00:18:37 +0100 Subject: [Lazarus] How to find out which version of Lazarus was used to build last? Message-ID: <4nmm0g9u5mroqbof8j993ar4sbp5gaijii@4ax.com> I have a bunch of programs I have written using Lazarus (on Windows 10). I have used several different versions of Lazarus so the older programs are written using an older version, and now I want to modify one of these but don't know which version was used when I last worked on the project. I don't want to modify too much so I would like to use the same version now... Question: --------- Is this information stored in any of the files in the project in a way that it can be read by opening the file in an editor? If so, which file? I have looked in the lpr, lps and lpi files without success... -- Bo Berglund Developer in Sweden From ryansmithhe at gmail.com Sat Jan 23 00:46:58 2021 From: ryansmithhe at gmail.com (R.Smith) Date: Sat, 23 Jan 2021 01:46:58 +0200 Subject: [Lazarus] Bump issue In-Reply-To: <c5e38dd9-5ab8-a46f-cb01-62944ca83835@pascalprogramming.org> References: <7cdf8d11-42f7-c0df-dcba-db837270a354@gmail.com> <alpine.DEB.2.22.394.2101222255310.1020599@home> <c5e38dd9-5ab8-a46f-cb01-62944ca83835@pascalprogramming.org> Message-ID: <1c34f167-d93f-b0de-d09b-9c038f71517d@gmail.com> On 2021/01/22 23:58, Marco van de Voort via lazarus wrote: > > Op 2021-01-22 om 22:56 schreef Michael Van Canneyt via lazarus: >> >> >> I have some time this weekend, I will commit it. > > Is it really a good idea to accept msec=1000 for TryEncodeTimeInterval > in a general unit like Dateutils? > > Maybe - can you construe a situation where the allowance would cause undue error or miscalculation of a datetime?  It's essentially an allowance for rounding. If your date-time calculation tries to add 999.999ms or 0.9999 sec to a datetime value, would you really be harmed if one full second was added? If so, what does it say for the occasion where you add 0.1116s and either 0.112s or 0.111s are physically added after rounding/truncation - is the prior any worse? Currently rounding works in all cases (000.000 up to 999.99444) except the very final 0.5ms of the range, and code has to be added to everything to fix that small remainig range because rounding perfectly *valid* time values to ms = 1000 will error out. I can and have demonstrated a case where NOT allowing msec=1000 is in fact detrimental and breaks in current production code (as far as the MySQL connection DATETIME values go) for any datetime fraction nearing lim{ dt --> 1000ms }. Allow me another demonstration without the DB stuff: Reproducible test case: Getting the current ms can be easily written as: ms := Round(Frac(Now() * 86400)*1000);    // ms is the fraction of the seconds multiplied by 1000 and rounded. Here is a full test-case anyone can run: procedure timetest;   var ms   : Integer;       dtms : TDateTime; begin   try     repeat       ms := Round(Frac(Now() * 86400)*1000);       dtms := EncodeTime(00,00,00,ms);     until false;   finally     WriteLn('ms: ',ms);   end; end; It errors out rather quick with the 1000ms culprit problem. Now as a programmer i have to either TRUNCATE the time, which is not great because 12.9ms will become 12ms in stead of 13ms, or add special code to test for ms=1000, and what is worse, that code is almost always:       if (ms=1000) then dtms := EncodeTime(00,00,01,00) else dtms := EncodeTime(00,00,00,ms); I hope it is not lost on any readers how silly that is - I mean what ELSE could one possibly end up doing/meaning in the case of 1000ms?. I will even argue that can be detrimental since I have seen fixes like this:       if (ms=1000) then ms:=999;       dtms := EncodeTime(00,00,00,ms); which drives me to tears of course, but one could almost understand why the programmer did that, sacrificing accuracy to get rif of a silly exception. It isn't FPC's fault though, that is just a bad programmer. As programmers our duty is to make our code conform strictly to the rules of the underlying systems, and I have been quite a vocal advocate for this on other fora - but rules should have clear reasons, not simply be rules for the sake of having rules - which comes to my challenge of showing a case where it is detrimental. There was a proposal to compute the specific datetime value for the MySQL connector itself in Floating point space, which is a perfect solution (and I will be very happy with that too), but does it address the full spectrum of plausible cases? Would this need to be fixed in the PostGres (etc.) connectors too? Fixing it at the root of date-time calculations when the change is indeed sensible, AND barring demonstrable "bad" cases (I hasten to add), seems the appropriate thing to do. Lastly... In other datetime calcs, if you try to add a day that doesn't exist (ex: dt := EncodeDate(2021,02,30); ) then the reason it is wrong is clear and it should error out, that date does not exist in current calendars. Adding 25ms to 02:15:04.975ms simply lands you at 02:15:05.000 - It's hard to for me to find a reasonable example of where that will cause undue error or a result that is fundamentally wrong. The only thing I can think that might be a problem is a programmer seeing that EncodeTime(02,15,40,1000) yields --> 02:15:41.  It's not technically wrong, but would this be unexpected? Would it confuse people? (Moreso than throwing an exception?) If this is the solution we go with, this 1000ms case should probably be mentioned clearly in the documentation. PS: I work with precision time a lot, GPS tracking systems etc, so for my use cases this is probably way more of a niggle than everyone else, so I concede my opinion doesn't carry all that much weight, but I really do not see the harm in fixing this for everyone - unless it can be shown to be detrimental, in which case I will happily accept it and appreciate being shown it. Thank you for caring! Ryan From lazarus at kluug.net Sat Jan 23 08:13:40 2021 From: lazarus at kluug.net (Ondrej Pokorny) Date: Sat, 23 Jan 2021 08:13:40 +0100 Subject: [Lazarus] Bump issue In-Reply-To: <alpine.DEB.2.22.394.2101222331360.1020599@home> References: <7cdf8d11-42f7-c0df-dcba-db837270a354@gmail.com> <alpine.DEB.2.22.394.2101222255310.1020599@home> <c5e38dd9-5ab8-a46f-cb01-62944ca83835@pascalprogramming.org> <alpine.DEB.2.22.394.2101222331360.1020599@home> Message-ID: <cb59138f-79b9-e916-deb9-6170e6166af7@kluug.net> On 22.01.2021 23:33, Michael Van Canneyt via lazarus wrote: > On Fri, 22 Jan 2021, Marco van de Voort via lazarus wrote: >> Op 2021-01-22 om 22:56 schreef Michael Van Canneyt via lazarus: >>> I have some time this weekend, I will commit it. >> >> Is it really a good idea to accept msec=1000 for >> TryEncodeTimeInterval in a general unit like Dateutils? > > I didn't say I would commit as-is :) > > I was not aware of this bugreport. > The lazarus devs should move the issue to FPC if they see it's an FPC > issue. > (supposing they can, at least) I cannot do that (I wanted to mode the issue yesterday). Administrator rights are probably needed. Ondrej From luca at wetron.es Sat Jan 23 10:43:35 2021 From: luca at wetron.es (Luca Olivetti) Date: Sat, 23 Jan 2021 10:43:35 +0100 Subject: [Lazarus] How to find out which version of Lazarus was used to build last? In-Reply-To: <4nmm0g9u5mroqbof8j993ar4sbp5gaijii@4ax.com> References: <4nmm0g9u5mroqbof8j993ar4sbp5gaijii@4ax.com> Message-ID: <27ef451f-25c3-9ba3-09a8-06b6f10ccd02@wetron.es> El 23/1/21 a les 0:18, Bo Berglund via lazarus ha escrit: > I have a bunch of programs I have written using Lazarus (on Windows 10). > > I have used several different versions of Lazarus so the older programs are > written using an older version, and now I want to modify one of these but don't > know which version was used when I last worked on the project. > I don't want to modify too much so I would like to use the same version now... > > Question: > --------- > Is this information stored in any of the files in the project in a way that it > can be read by opening the file in an editor? > If so, which file? > I have looked in the lpr, lps and lpi files without success... You'll have to look for strings in the executable. Usually both the version of FPC and of the LCL are there. Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From bartjunk64 at gmail.com Sat Jan 23 13:32:29 2021 From: bartjunk64 at gmail.com (Bart) Date: Sat, 23 Jan 2021 13:32:29 +0100 Subject: [Lazarus] How to find out which version of Lazarus was used to build last? In-Reply-To: <27ef451f-25c3-9ba3-09a8-06b6f10ccd02@wetron.es> References: <4nmm0g9u5mroqbof8j993ar4sbp5gaijii@4ax.com> <27ef451f-25c3-9ba3-09a8-06b6f10ccd02@wetron.es> Message-ID: <CAMye31yeSrv8-CXmh1sSQ+FAwwcarzwSXnU6Yq6ygrDXQ=oftg@mail.gmail.com> Assuming you have the sources, and it is a Lazarus program, then in the LFM there is a string like: LCLVersion = '2.1.0.0' That will be the last version you used to save or build the program with. -- Bart From juha.manninen62 at gmail.com Sat Jan 23 14:28:39 2021 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Sat, 23 Jan 2021 15:28:39 +0200 Subject: [Lazarus] How to find out which version of Lazarus was used to build last? In-Reply-To: <4nmm0g9u5mroqbof8j993ar4sbp5gaijii@4ax.com> References: <4nmm0g9u5mroqbof8j993ar4sbp5gaijii@4ax.com> Message-ID: <CAPN1EhBCqz_qhBhs_gkVwvt2CjEO+FENG6E68+AYMBCtGPW0Yw@mail.gmail.com> On Sat, Jan 23, 2021 at 1:18 AM Bo Berglund via lazarus < lazarus at lists.lazarus-ide.org> wrote: > I don't want to modify too much so I would like to use the same version > now... > How many and what kind of modifications are needed? All libraries try to stay backwards compatible. As a general rule new versions are better than old versions. I recommend you jump to the latest versions of FPC and Lazarus. Regards, Juha -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20210123/69b605ee/attachment.html> From bo.berglund at gmail.com Sat Jan 23 14:56:50 2021 From: bo.berglund at gmail.com (Bo Berglund) Date: Sat, 23 Jan 2021 14:56:50 +0100 Subject: [Lazarus] How to find out which version of Lazarus was used to build last? References: <4nmm0g9u5mroqbof8j993ar4sbp5gaijii@4ax.com> <27ef451f-25c3-9ba3-09a8-06b6f10ccd02@wetron.es> <CAMye31yeSrv8-CXmh1sSQ+FAwwcarzwSXnU6Yq6ygrDXQ=oftg@mail.gmail.com> Message-ID: <0nao0g1ompfs9fcknus5ig1rf40betfv63@4ax.com> On Sat, 23 Jan 2021 13:32:29 +0100, Bart via lazarus <lazarus at lists.lazarus-ide.org> wrote: >Assuming you have the sources, and it is a Lazarus program, then in >the LFM there is a string like: LCLVersion = '2.1.0.0' >That will be the last version you used to save or build the program with. Well, that presupposes that it is a GUI program, which it is not. A console program has no lfm file associated with it, I believe. -- Bo Berglund Developer in Sweden From bo.berglund at gmail.com Sat Jan 23 15:02:00 2021 From: bo.berglund at gmail.com (Bo Berglund) Date: Sat, 23 Jan 2021 15:02:00 +0100 Subject: [Lazarus] How to find out which version of Lazarus was used to build last? References: <4nmm0g9u5mroqbof8j993ar4sbp5gaijii@4ax.com> <CAPN1EhBCqz_qhBhs_gkVwvt2CjEO+FENG6E68+AYMBCtGPW0Yw@mail.gmail.com> Message-ID: <gpao0g1uv1htjrgcfph8d2kphmq3gg71kl@4ax.com> On Sat, 23 Jan 2021 15:28:39 +0200, Juha Manninen via lazarus <lazarus at lists.lazarus-ide.org> wrote: >On Sat, Jan 23, 2021 at 1:18 AM Bo Berglund via lazarus < >lazarus at lists.lazarus-ide.org> wrote: > >> I don't want to modify too much so I would like to use the same version >> now... >> > >How many and what kind of modifications are needed? >All libraries try to stay backwards compatible. As a general rule new >versions are better than old versions. >I recommend you jump to the latest versions of FPC and Lazarus. It is a console program used as a wrapper for ffmpeg use to simplify my video handling functions. I need it to build both on Ubuntu and Windows because I have the same tools on both. In this case I did not modify the interface program for 2 years, but now I need to tweak the ffmpeg call so I must open it in one of my several Lazarus installations on Windows10. Then the same on Ubuntu. And I do not want some auto-upgrade function launched from a newer Lazarus destroy the sources if I need to go back to an earlier version. -- Bo Berglund Developer in Sweden From bartjunk64 at gmail.com Sat Jan 23 16:14:37 2021 From: bartjunk64 at gmail.com (Bart) Date: Sat, 23 Jan 2021 16:14:37 +0100 Subject: [Lazarus] How to find out which version of Lazarus was used to build last? In-Reply-To: <gpao0g1uv1htjrgcfph8d2kphmq3gg71kl@4ax.com> References: <4nmm0g9u5mroqbof8j993ar4sbp5gaijii@4ax.com> <CAPN1EhBCqz_qhBhs_gkVwvt2CjEO+FENG6E68+AYMBCtGPW0Yw@mail.gmail.com> <gpao0g1uv1htjrgcfph8d2kphmq3gg71kl@4ax.com> Message-ID: <CAMye31yu+Er9E-bMskiny+5Y4VPFUXU7-BiYCz86xJw5Yyh3qg@mail.gmail.com> On Sat, Jan 23, 2021 at 3:02 PM Bo Berglund via lazarus <lazarus at lists.lazarus-ide.org> wrote: > It is a console program used as a wrapper for ffmpeg use to simplify my video > handling functions. In that case I think it is not possible to determine which Lazarus IDE version was used to compile the application. You can retrieve the fpc version (there is a sig in the executable). > And I do not want some auto-upgrade function launched from a newer Lazarus > destroy the sources if I need to go back to an earlier version. Only the LPI structure could be updated, and if your aap depends on LazUtils, the also the code. You can open old project in newer Lazarus and there is some setting to save the LPI in a backwards compatible xml-format, so you can open it eagain in the older Lazarus IDE. If your app does NOT depend on LazUtils, then there is absolutely no reason to open it in a recent Lazarus IDE, since then only the compiler version matters. (Well, in my setup I install fpc independant from Lazarus, so then it's relatively simple). -- Bart From juha.manninen62 at gmail.com Sat Jan 23 16:25:06 2021 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Sat, 23 Jan 2021 17:25:06 +0200 Subject: [Lazarus] How to find out which version of Lazarus was used to build last? In-Reply-To: <gpao0g1uv1htjrgcfph8d2kphmq3gg71kl@4ax.com> References: <4nmm0g9u5mroqbof8j993ar4sbp5gaijii@4ax.com> <CAPN1EhBCqz_qhBhs_gkVwvt2CjEO+FENG6E68+AYMBCtGPW0Yw@mail.gmail.com> <gpao0g1uv1htjrgcfph8d2kphmq3gg71kl@4ax.com> Message-ID: <CAPN1EhD=E5qJJR+zVisUayqDJ2HBtRgbcvdvW_ihei+TnzLtUg@mail.gmail.com> On Sat, Jan 23, 2021 at 4:02 PM Bo Berglund via lazarus < lazarus at lists.lazarus-ide.org> wrote: > And I do not want some auto-upgrade function launched from a newer Lazarus > destroy the sources if I need to go back to an earlier version. > There are no auto-upgrade functions. If a new library version for some reason requires a modification, it must be made manually. Maybe I asked poorly. I meant: What modifications are needed because of updating FPC and Lazarus? Why don't you try it? Obviously backup your sources. Juha -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20210123/438683e0/attachment.html> From luca at wetron.es Sat Jan 23 16:40:21 2021 From: luca at wetron.es (Luca Olivetti) Date: Sat, 23 Jan 2021 16:40:21 +0100 Subject: [Lazarus] How to find out which version of Lazarus was used to build last? In-Reply-To: <CAPN1EhBCqz_qhBhs_gkVwvt2CjEO+FENG6E68+AYMBCtGPW0Yw@mail.gmail.com> References: <4nmm0g9u5mroqbof8j993ar4sbp5gaijii@4ax.com> <CAPN1EhBCqz_qhBhs_gkVwvt2CjEO+FENG6E68+AYMBCtGPW0Yw@mail.gmail.com> Message-ID: <dc464012-a33f-f16a-5194-17181bbc8dba@wetron.es> El 23/1/21 a les 14:28, Juha Manninen via lazarus ha escrit: > On Sat, Jan 23, 2021 at 1:18 AM Bo Berglund via lazarus > <lazarus at lists.lazarus-ide.org <mailto:lazarus at lists.lazarus-ide.org>> > wrote: > > I don't want to modify too much so I would like to use the same > version now... > > > How many and what kind of modifications are needed? I know because I had to do it recently and the answer is: a lot. And I wasn't even using a really old version (I last modified the program 3 years ago). I another case, with an older program (last touched in November 2015) where I just needed to change one line, the diff is around 11000 lines (though many of those are just useless changes in the lfm files). > All libraries try to stay backwards compatible. As a general rule new > versions are better than old versions. And introduce new bugs, change the defaults so your program no longer works as it should, etc. I've seen it all. > I recommend you jump to the latest versions of FPC and Lazarus. I try to do that, but trust me, it isn't easy. It's not the first time I had to go back to a previous version due to bugs (or simply different behavior) in the compiler, lcl, other libraries, etc. Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From luca at wetron.es Sat Jan 23 16:44:18 2021 From: luca at wetron.es (Luca Olivetti) Date: Sat, 23 Jan 2021 16:44:18 +0100 Subject: [Lazarus] How to find out which version of Lazarus was used to build last? In-Reply-To: <dc464012-a33f-f16a-5194-17181bbc8dba@wetron.es> References: <4nmm0g9u5mroqbof8j993ar4sbp5gaijii@4ax.com> <CAPN1EhBCqz_qhBhs_gkVwvt2CjEO+FENG6E68+AYMBCtGPW0Yw@mail.gmail.com> <dc464012-a33f-f16a-5194-17181bbc8dba@wetron.es> Message-ID: <b6ee9784-013d-a43e-945a-cc2fea829eb3@wetron.es> El 23/1/21 a les 16:40, Luca Olivetti via lazarus ha escrit: > > I try to do that, but trust me, it isn't easy. > It's not the first time I had to go back to a previous version due to > bugs (or simply different behavior) in the compiler, lcl, other > libraries, etc. And note that I'm *not* complaining. Other, more resourceful, project fare much worse in my book (e.g. python 2 vs. python 3). Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From juha.manninen62 at gmail.com Sat Jan 23 17:03:05 2021 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Sat, 23 Jan 2021 18:03:05 +0200 Subject: [Lazarus] How to find out which version of Lazarus was used to build last? In-Reply-To: <dc464012-a33f-f16a-5194-17181bbc8dba@wetron.es> References: <4nmm0g9u5mroqbof8j993ar4sbp5gaijii@4ax.com> <CAPN1EhBCqz_qhBhs_gkVwvt2CjEO+FENG6E68+AYMBCtGPW0Yw@mail.gmail.com> <dc464012-a33f-f16a-5194-17181bbc8dba@wetron.es> Message-ID: <CAPN1EhBcE-6-gm8dP98kWxNhXPbOECh3wJBX0vErdtMRQNbHOQ@mail.gmail.com> On Sat, Jan 23, 2021 at 5:40 PM Luca Olivetti via lazarus < lazarus at lists.lazarus-ide.org> wrote: > I know because I had to do it recently and the answer is: a lot. > And I wasn't even using a really old version (I last modified the > program 3 years ago). > That is unexpected. Was it related to the Unicode string change? Indeed it broke backwards compatibility. If not, what required the biggest change? Juha -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20210123/94703c81/attachment.html> From wkitty42 at windstream.net Sat Jan 23 17:53:56 2021 From: wkitty42 at windstream.net (wkitty42 at windstream.net) Date: Sat, 23 Jan 2021 11:53:56 -0500 Subject: [Lazarus] How to find out which version of Lazarus was used to build last? In-Reply-To: <CAPN1EhD=E5qJJR+zVisUayqDJ2HBtRgbcvdvW_ihei+TnzLtUg@mail.gmail.com> References: <4nmm0g9u5mroqbof8j993ar4sbp5gaijii@4ax.com> <CAPN1EhBCqz_qhBhs_gkVwvt2CjEO+FENG6E68+AYMBCtGPW0Yw@mail.gmail.com> <gpao0g1uv1htjrgcfph8d2kphmq3gg71kl@4ax.com> <CAPN1EhD=E5qJJR+zVisUayqDJ2HBtRgbcvdvW_ihei+TnzLtUg@mail.gmail.com> Message-ID: <db8e02d6-5917-067e-f68f-e2fb55ffcd8d@windstream.net> On 1/23/21 10:25 AM, Juha Manninen via lazarus wrote: > Maybe I asked poorly. I meant: What modifications are needed because of updating > FPC and Lazarus? > Why don't you try it? > Obviously backup your sources. or branch the repo and see then open the sources and see what happens... -- NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list where it belongs!* From luca at wetron.es Sat Jan 23 18:50:35 2021 From: luca at wetron.es (Luca Olivetti) Date: Sat, 23 Jan 2021 18:50:35 +0100 Subject: [Lazarus] How to find out which version of Lazarus was used to build last? In-Reply-To: <CAPN1EhBcE-6-gm8dP98kWxNhXPbOECh3wJBX0vErdtMRQNbHOQ@mail.gmail.com> References: <4nmm0g9u5mroqbof8j993ar4sbp5gaijii@4ax.com> <CAPN1EhBCqz_qhBhs_gkVwvt2CjEO+FENG6E68+AYMBCtGPW0Yw@mail.gmail.com> <dc464012-a33f-f16a-5194-17181bbc8dba@wetron.es> <CAPN1EhBcE-6-gm8dP98kWxNhXPbOECh3wJBX0vErdtMRQNbHOQ@mail.gmail.com> Message-ID: <0e80b64d-8b5b-b6ae-6c85-c2b28f20b1ef@wetron.es> El 23/1/21 a les 17:03, Juha Manninen via lazarus ha escrit: > On Sat, Jan 23, 2021 at 5:40 PM Luca Olivetti via lazarus > <lazarus at lists.lazarus-ide.org <mailto:lazarus at lists.lazarus-ide.org>> > wrote: > > I know because I had to do it recently and the answer is: a lot. > And I wasn't even using a really old version (I last modified the > program 3 years ago). > > > That is unexpected. > Was it related to the Unicode string change? Indeed it > broke backwards compatibility. > If not, what required the biggest change? Yes, mostly related to the change from FileUtil to LazFileUtil due to the relocation of UTF8* functions and the removal of UTF8ToSys and SysToUT8. Those I found straight away since it was a compile time error. More subtle was the change from LoadFromStream(stream) to LoadFromStream(Stream, TEncoding.UTF8), since both variants are valid and I didn't realize until the content of the loaded file was messed up. All in all the unicode string change had less of an impact that I had anticipated, still it needs a lot of testing to ensure that everything works as before. A more serious problem was related to an external library (zeos database), since they changed several defaults and that broke things until I found the workaround. That's not a fault of the fpc/lazarus team of course, but still, if you want to go forward, you often have to use updated versions of external libraries, and that's something to take into account. Sometimes, when the required change is trivial, it's just easier to use the original compiler/lcl combo (though I still prefer to bring things forward). As I said, I'm not complaining, just saying what I found. Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From bo.berglund at gmail.com Sat Jan 23 18:51:43 2021 From: bo.berglund at gmail.com (Bo Berglund) Date: Sat, 23 Jan 2021 18:51:43 +0100 Subject: [Lazarus] How to find out which version of Lazarus was used to build last? References: <4nmm0g9u5mroqbof8j993ar4sbp5gaijii@4ax.com> <CAPN1EhBCqz_qhBhs_gkVwvt2CjEO+FENG6E68+AYMBCtGPW0Yw@mail.gmail.com> <dc464012-a33f-f16a-5194-17181bbc8dba@wetron.es> Message-ID: <i6oo0gdampqr95v04btrio6t0c4fvvm5lr@4ax.com> On Sat, 23 Jan 2021 16:40:21 +0100, Luca Olivetti via lazarus <lazarus at lists.lazarus-ide.org> wrote: >> How many and what kind of modifications are needed? > >I know because I had to do it recently and the answer is: a lot. >And I wasn't even using a really old version (I last modified the >program 3 years ago). >I another case, with an older program (last touched in November 2015) >where I just needed to change one line, the diff is around 11000 lines >(though many of those are just useless changes in the lfm files). > > >> All libraries try to stay backwards compatible. As a general rule new >> versions are better than old versions. > >And introduce new bugs, change the defaults so your program no longer >works as it should, etc. >I've seen it all. > >> I recommend you jump to the latest versions of FPC and Lazarus. > >I try to do that, but trust me, it isn't easy. >It's not the first time I had to go back to a previous version due to >bugs (or simply different behavior) in the compiler, lcl, other >libraries, etc. Luca, this is precisely why I asked! Anyway, I now understand that for a GUI application, which uses forms, I can find the Lazarus version last used by looking inside one of the lfm files last changed. But for the console programs this is not needed and then I could probably just open it in any recent Lazarus since it is just the fpc that is involved here. Lazarus just used as a manager for fpc and as an intelligent editor, right? The current case is this helper console application, but I also have a number of GUI applications that might need work going forward and now I know how to handle these. Thanks all! -- Bo Berglund Developer in Sweden From andrey.sobol.nn at gmail.com Tue Jan 26 09:31:26 2021 From: andrey.sobol.nn at gmail.com (Andrey Sobol) Date: Tue, 26 Jan 2021 11:31:26 +0300 Subject: [Lazarus] Change of lfm files Message-ID: <7aa02b8c-428f-9b75-4900-328f674fc948@gmail.com> Hello, Let us suppose, I have changed a form inside tool/debugserver I see what inside .lfm file a version of LCL changed from 1.3 to 2.10 for example. What is policy about LCL compatibility for patches? Where can I read about this? -- Andrey From lazarus at kluug.net Tue Jan 26 10:02:51 2021 From: lazarus at kluug.net (Ondrej Pokorny) Date: Tue, 26 Jan 2021 10:02:51 +0100 Subject: [Lazarus] Change of lfm files In-Reply-To: <7aa02b8c-428f-9b75-4900-328f674fc948@gmail.com> References: <7aa02b8c-428f-9b75-4900-328f674fc948@gmail.com> Message-ID: <b94ac299-c0b9-36c2-7745-dc081bb90d47@kluug.net> On 26.01.2021 09:31, Andrey Sobol via lazarus wrote: > Hello, > Let us suppose, I have changed a form inside tool/debugserver > I see what inside .lfm file a version of LCL changed  from 1.3 to 2.10 > for example. > > What is policy about LCL compatibility for patches? > Where can I read about this? We somehow internally agreed on forwards compatibility for 1 legacy version. That means that LFM created in the latest stable Lazarus version should open in the stable version prior to it. For development it means that 2.0.10 should be able to open LFMs from trunk. Backwards compatibility is obvious. Ondrej From lazarus at kluug.net Tue Jan 26 10:07:35 2021 From: lazarus at kluug.net (Ondrej Pokorny) Date: Tue, 26 Jan 2021 10:07:35 +0100 Subject: [Lazarus] Change of lfm files In-Reply-To: <b94ac299-c0b9-36c2-7745-dc081bb90d47@kluug.net> References: <7aa02b8c-428f-9b75-4900-328f674fc948@gmail.com> <b94ac299-c0b9-36c2-7745-dc081bb90d47@kluug.net> Message-ID: <a1efcadc-688c-6b9b-c13a-c3da494cf07e@kluug.net> On 26.01.2021 10:02, Ondrej Pokorny via lazarus wrote: > On 26.01.2021 09:31, Andrey Sobol via lazarus wrote: >> Hello, >> Let us suppose, I have changed a form inside tool/debugserver >> I see what inside .lfm file a version of LCL changed  from 1.3 to >> 2.10 for example. >> >> What is policy about LCL compatibility for patches? >> Where can I read about this? > > We somehow internally agreed on forwards compatibility for 1 legacy > version. > > That means that LFM created in the latest stable Lazarus version > should open in the stable version prior to it. > > For development it means that 2.0.10 should be able to open LFMs from > trunk. > > Backwards compatibility is obvious. What I wrote is about component development and its streaming mechanism. If you want to change forms and frames within Lazarus sources, do so freely. There is no need for any compatibility across different versions. Ondrej From alfred at consulab.nl Wed Jan 27 07:26:58 2021 From: alfred at consulab.nl (Alfred) Date: Wed, 27 Jan 2021 06:26:58 +0000 Subject: [Lazarus] Custom options FPC WpXXX. Message-ID: <ema9921f0e-ce48-4a8b-9122-b477c08ac4d7@alfsacer> Hello, Work is done regarding the FPC embedded FreeRTOS target. Results are looking very good. Time for a bit more Lazarus integration. Question. When compiling for embedded, the -WpXXX FPC option is used as a custom option in Lazarus. To define an embedded system. This setting is exported as a FPC macro: FPC_MCU_XXX. However, this macro is not visible/usable in Lazarus. All code enclosed if a {$define FPC_MCU_XXX}...{$endif} remains grayed out. It would be very nice to get this implemented. If somebody points me to the right direction, I will make a patch myself if needed. However, I need some help to know were to start. Thanks, Alfred. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20210127/bbdd9faf/attachment.html> From friess at gmx.at Wed Jan 27 07:41:38 2021 From: friess at gmx.at (=?UTF-8?Q?Andreas_Frie=c3=9f?=) Date: Wed, 27 Jan 2021 07:41:38 +0100 Subject: [Lazarus] MSSQL howto catch a TMSSQLConnection Error without Messagebox? Message-ID: <6810780b-e3a7-3c62-6a61-2e98a7869c7f@gmx.at> On my Raspi/Debian i got on a TMSSQLConnection a messagebox if the server is not reachable. The connection is not my problem, but i am not able to cach this exeption silent without poping up this messagebox. The problem is, the messagebox pops up and want an OK or ABORT. In my code i catch the exception, set a flag and reraise try       if IsOk then AConnection.Connected := true;  except       on E : Exception do begin         IsOk:=false;         raise;       end;  end; The calling function does this Quote   Result := false;   try     xxxxxxxx(IsOk);     Result := true;   except     on E : Exception do begin      .........     end;   end; So the exception should silent catched and i can handle if a connection is ok or not. How can i avoid the unwanted box ? regards Andreas From michael at freepascal.org Wed Jan 27 12:46:51 2021 From: michael at freepascal.org (Michael Van Canneyt) Date: Wed, 27 Jan 2021 12:46:51 +0100 (CET) Subject: [Lazarus] MSSQL howto catch a TMSSQLConnection Error without Messagebox? In-Reply-To: <6810780b-e3a7-3c62-6a61-2e98a7869c7f@gmx.at> References: <6810780b-e3a7-3c62-6a61-2e98a7869c7f@gmx.at> Message-ID: <alpine.DEB.2.22.394.2101271246210.1146865@home> On Wed, 27 Jan 2021, Andreas Frieß via lazarus wrote: > On my Raspi/Debian i got on a TMSSQLConnection a messagebox if the > server is not reachable. The connection is not my problem, but i am not > able to cach this exeption silent without poping up this messagebox. > > The problem is, the messagebox pops up and want an OK or ABORT. > In my code i catch the exception, set a flag and reraise > > try >       if IsOk then AConnection.Connected := true; >  except >       on E : Exception do begin >         IsOk:=false; >         raise; >       end; >  end; > > The calling function does this > Quote >   Result := false; >   try >     xxxxxxxx(IsOk); >     Result := true; >   except >     on E : Exception do begin >      ......... Do you also re-raise here ? > >     end; >   end; > > So the exception should silent catched and i can handle if a connection > is ok or not. > > How can i avoid the unwanted box ? Normally catching the exception is enough. Michael. From friess at gmx.at Wed Jan 27 15:57:26 2021 From: friess at gmx.at (=?UTF-8?Q?Andreas_Frie=c3=9f?=) Date: Wed, 27 Jan 2021 15:57:26 +0100 Subject: [Lazarus] MSSQL howto catch a TMSSQLConnection Error without Messagebox? In-Reply-To: <alpine.DEB.2.22.394.2101271246210.1146865@home> References: <6810780b-e3a7-3c62-6a61-2e98a7869c7f@gmx.at> <alpine.DEB.2.22.394.2101271246210.1146865@home> Message-ID: <7e320c58-7a7c-5751-90ef-aab1ae7774be@gmx.at> Hi Michael, no, i did not re-raise there. I want only a silent flag. This should done by the Result:= false in the calling function. regards Andreas Am 27.01.2021 um 12:46 schrieb Michael Van Canneyt: > > > On Wed, 27 Jan 2021, Andreas Frieß via lazarus wrote: > >> On my Raspi/Debian i got on a TMSSQLConnection a messagebox if the >> server is not reachable. The connection is not my problem, but i am not >> able to cach this exeption silent without poping up this messagebox. >> >> The problem is, the messagebox pops up and want an OK or ABORT. >> In my code i catch the exception, set a flag and reraise >> >> try >>       if IsOk then AConnection.Connected := true; >>  except >>       on E : Exception do begin >>         IsOk:=false; >>         raise; >>       end; >>  end; >> >> The calling function does this >> Quote >>   Result := false; >>   try >>     xxxxxxxx(IsOk); >>     Result := true; >>   except >>     on E : Exception do begin >>      ......... > > Do you also re-raise here ? > >> >>     end; >>   end; >> >> So the exception should silent catched and i can handle if a connection >> is ok or not. >> >> How can i avoid the unwanted box ? > > Normally catching the exception is enough. > > Michael. From michael at freepascal.org Wed Jan 27 16:02:40 2021 From: michael at freepascal.org (Michael Van Canneyt) Date: Wed, 27 Jan 2021 16:02:40 +0100 (CET) Subject: [Lazarus] MSSQL howto catch a TMSSQLConnection Error without Messagebox? In-Reply-To: <7e320c58-7a7c-5751-90ef-aab1ae7774be@gmx.at> References: <6810780b-e3a7-3c62-6a61-2e98a7869c7f@gmx.at> <alpine.DEB.2.22.394.2101271246210.1146865@home> <7e320c58-7a7c-5751-90ef-aab1ae7774be@gmx.at> Message-ID: <alpine.DEB.2.22.394.2101271602040.1153298@home> If you don't do a re-raise, I don't understand where the dialog box comes from, since you're catching all exceptions... Michael. On Wed, 27 Jan 2021, Andreas Frieß via lazarus wrote: > Hi Michael, > > no, i did not re-raise there. > > I want only a silent flag. This should done by the Result:= false in the > calling function. > > regards > > Andreas > > Am 27.01.2021 um 12:46 schrieb Michael Van Canneyt: >> >> >> On Wed, 27 Jan 2021, Andreas Frieß via lazarus wrote: >> >>> On my Raspi/Debian i got on a TMSSQLConnection a messagebox if the >>> server is not reachable. The connection is not my problem, but i am not >>> able to cach this exeption silent without poping up this messagebox. >>> >>> The problem is, the messagebox pops up and want an OK or ABORT. >>> In my code i catch the exception, set a flag and reraise >>> >>> try >>>       if IsOk then AConnection.Connected := true; >>>  except >>>       on E : Exception do begin >>>         IsOk:=false; >>>         raise; >>>       end; >>>  end; >>> >>> The calling function does this >>> Quote >>>   Result := false; >>>   try >>>     xxxxxxxx(IsOk); >>>     Result := true; >>>   except >>>     on E : Exception do begin >>>      ......... >> >> Do you also re-raise here ? >> >>> >>>     end; >>>   end; >>> >>> So the exception should silent catched and i can handle if a connection >>> is ok or not. >>> >>> How can i avoid the unwanted box ? >> >> Normally catching the exception is enough. >> >> Michael. > -- > _______________________________________________ > lazarus mailing list > lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus > From nc-gaertnma at netcologne.de Wed Jan 27 16:12:55 2021 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Wed, 27 Jan 2021 16:12:55 +0100 Subject: [Lazarus] MSSQL howto catch a TMSSQLConnection Error without Messagebox? In-Reply-To: <alpine.DEB.2.22.394.2101271602040.1153298@home> References: <6810780b-e3a7-3c62-6a61-2e98a7869c7f@gmx.at> <alpine.DEB.2.22.394.2101271246210.1146865@home> <7e320c58-7a7c-5751-90ef-aab1ae7774be@gmx.at> <alpine.DEB.2.22.394.2101271602040.1153298@home> Message-ID: <20210127161255.0b885161@limapholos.matflo.wg> On Wed, 27 Jan 2021 16:02:40 +0100 (CET) Michael Van Canneyt via lazarus <lazarus at lists.lazarus-ide.org> wrote: > If you don't do a re-raise, I don't understand where the dialog box > comes from, since you're catching all exceptions... Maybe try     xxxxxxxx(IsOk); except end; The xxxxxxx contains a ShowModal? Mattias From friess at gmx.at Wed Jan 27 20:42:24 2021 From: friess at gmx.at (=?UTF-8?Q?Andreas_Frie=c3=9f?=) Date: Wed, 27 Jan 2021 20:42:24 +0100 Subject: [Lazarus] MSSQL howto catch a TMSSQLConnection Error without Messagebox? In-Reply-To: <20210127161255.0b885161@limapholos.matflo.wg> References: <6810780b-e3a7-3c62-6a61-2e98a7869c7f@gmx.at> <alpine.DEB.2.22.394.2101271246210.1146865@home> <7e320c58-7a7c-5751-90ef-aab1ae7774be@gmx.at> <alpine.DEB.2.22.394.2101271602040.1153298@home> <20210127161255.0b885161@limapholos.matflo.wg> Message-ID: <30f3f845-5d84-b52c-c760-ff38efe5e28b@gmx.at> No, befor the try is  a ping to test if the server itself is reachable. This is done with a 'ShowOnTop' Form - but not showmodal. It looks like isOk := pingtheserver(xxxx);  // <-- here is a form with showontop created and destoyed if isOk then begin   try      xxxxxxxx(IsOk);   except   end; end; No showmodal inside the try/except block. But i will check if i need the re-raise in the inner block. Andreas Am 27.01.2021 um 16:12 schrieb Mattias Gaertner via lazarus: > On Wed, 27 Jan 2021 16:02:40 +0100 (CET) > Michael Van Canneyt via lazarus <lazarus at lists.lazarus-ide.org> wrote: > >> If you don't do a re-raise, I don't understand where the dialog box >> comes from, since you're catching all exceptions... > Maybe > > try >     xxxxxxxx(IsOk); > except > end; > > The xxxxxxx contains a ShowModal? > > Mattias -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot 2021-01-15 113833.jpg Type: image/jpeg Size: 25014 bytes Desc: not available URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20210127/32f048d6/attachment-0001.jpg> From octopushole at gmail.com Sun Jan 31 23:23:11 2021 From: octopushole at gmail.com (duilio foschi) Date: Sun, 31 Jan 2021 23:23:11 +0100 Subject: [Lazarus] using a weird DLL Message-ID: <CABkiRz8oaKiQ5yaYHjW9v5X3XiFbgQ-Nn+bsMGpyLsNds5FbSg@mail.gmail.com> I would like to use a function exported from a DLL. The DLL was written in C++ (Visual Studio 2015). Inside the original code the function is declared as public bool GetSkinFeatures(Bitmap Input_Bitmap, Rectangle ROI_Rect, double[] ExtractedFeatures) Anybody knows how to use it from Lazarus? This is too much for me... Thank you Duilio -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20210131/7be61105/attachment.html>