From badsectoracula at gmail.com Sat Oct 1 11:59:47 2016 From: badsectoracula at gmail.com (Bad Sector) Date: Sat, 1 Oct 2016 12:59:47 +0300 Subject: [Lazarus] Can't add new form to Lazarus App In-Reply-To: <20160930015718.D4E9A204FD@server.lazarus-ide.org> References: <1475099355.25243.7.camel@Hercules> <20160929095743.26c22868@limapholos.matflo.wg> <1475146789.30403.3.camel@Hercules> <20160929131729.0597cf93@limapholos.matflo.wg> <1475177162.3893.3.camel@Mercury> <9da3d896-897b-8d17-4d11-ab09407f0185@narod.ru> <20160930015718.D4E9A204FD@server.lazarus-ide.org> Message-ID: <57EF8913.6020109@gmail.com> brian via Lazarus wrote: > On Fri, 30 Sep 2016 00:38:39 +0300, Maxim Ganetsky wrote: > >> 29.09.2016 22:26, Terry A. Haimann via Lazarus ?????: >>> I created the form by clicking on NewForm and then I tried to rename it >>> from the Object Inspector. I am running Lazarus 1.2.4 This app has >> >> Lazarus 1.2.4? Is it a joke? >> > > This is straying from the point, but anybody who has worked for a > LARGE (probably governmental) bureaucracy is likely to be all too > familiar with being forced to use out-of-date software. Performing > 'unapproved' upgrades may well mean disciplinary proceedings. Yes, > I've had to work under those conditions. :( > > I completely understand the logic for the Lazarus developers wanting > to know whether a problem can be reproduced with the latest version. > You just have to remember that some people aren't allowed to use that > version, as much as they would like to do so. > > > Brian. > Also Lazarus/LCL and Free Pascal APIs aren't exactly stable between releases as with every release of both Lazarus and Free Pascal you have things that change and/or break (the string API changes are a recent big one, but many other things change every release). It shouldn't be surprising when people want to stick with some version for a long time to avoid gotchas. Also when making branched releases you may want to keep the version of the tools you used at that release time around in case you want to do fixes later on that branch. From capricorn8159 at gmail.com Sat Oct 1 13:48:47 2016 From: capricorn8159 at gmail.com (Shaun) Date: Sat, 1 Oct 2016 12:48:47 +0100 Subject: [Lazarus] that's surprised me a lot In-Reply-To: <00002e1b49a2$abce09e1$02b207d2$@gmx.de> References: <00002e1b49a2$abce09e1$02b207d2$@gmx.de> Message-ID: sorry to inform you but the link leads to a scam site that has been doing the rounds for quite some time. On 30/09/2016 21:52, Sascha.Hestermann via Lazarus wrote: > > Dear, > > I've read something interesting recently, so I decided to show it to > you. It is something really surprising, please take a look > http://copy.eawebholdings.com/aekvlcx > > Thanks for your consideration, Sascha.Hestermann > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From doug at moosemail.net Sat Oct 1 14:01:56 2016 From: doug at moosemail.net (DougC) Date: Sat, 01 Oct 2016 08:01:56 -0400 Subject: [Lazarus] Messages from who? Message-ID: <157801f49b7.10d86ee9978628.5148273957526266804@moosemail.net> Recent changes to the Lazarus mailing list make it more difficult to identify who has posted a message. The FROM field is always the list, itself, now. I've noticed that a specific address is CC: to each message. Is this the person who actually posted the message? Are there any plans to restore the actual FROM source to the messages? Doug C. -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.e.sanliturk at gmail.com Sat Oct 1 14:41:08 2016 From: m.e.sanliturk at gmail.com (Mehmet Erol Sanliturk) Date: Sat, 1 Oct 2016 05:41:08 -0700 Subject: [Lazarus] Messages from who? In-Reply-To: <157801f49b7.10d86ee9978628.5148273957526266804@moosemail.net> References: <157801f49b7.10d86ee9978628.5148273957526266804@moosemail.net> Message-ID: On Sat, Oct 1, 2016 at 5:01 AM, DougC via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > Recent changes to the Lazarus mailing list make it more difficult to > identify who has posted a message. The FROM field is always the list, > itself, now. > > I've noticed that a specific address is CC: to each message. Is this the > person who actually posted the message? > > Are there any plans to restore the actual FROM source to the messages? > > Doug C. > > > > -- > _______________________________________________ > > In my copy of your message , "FROM" is DougC via Lazarus Is not "DougC" you ? Mehmet Erol Sanliturk -------------- next part -------------- An HTML attachment was scrubbed... URL: From doug at moosemail.net Sat Oct 1 14:44:16 2016 From: doug at moosemail.net (DougC) Date: Sat, 01 Oct 2016 08:44:16 -0400 Subject: [Lazarus] Messages from who? In-Reply-To: References: <157801f49b7.10d86ee9978628.5148273957526266804@moosemail.net> Message-ID: <15780460950.d282115080110.8625057439301242800@moosemail.net> Yes, DougC is me but I see lazarus at lists.lazarus-ide.org in FROM: so I guess it's my email client doing this. Sigh. Sorry about the noise! ---- On Sat, 01 Oct 2016 08:41:08 -0400Mehmet Erol Sanliturk via Lazarus <lazarus at lists.lazarus-ide.org> wrote ---- On Sat, Oct 1, 2016 at 5:01 AM, DougC via Lazarus <lazarus at lists.lazarus-ide.org> wrote: Recent changes to the Lazarus mailing list make it more difficult to identify who has posted a message. The FROM field is always the list, itself, now. I've noticed that a specific address is CC: to each message. Is this the person who actually posted the message? Are there any plans to restore the actual FROM source to the messages? Doug C. -- _______________________________________________ In my copy of your message , "FROM" is DougC via Lazarus <lazarus at lists.lazarus-ide.org> Is not "DougC" you ? Mehmet Erol Sanliturk -- _______________________________________________ Lazarus mailing list Lazarus at lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: From Sascha.Hestermann at gmx.de Sat Oct 1 17:02:39 2016 From: Sascha.Hestermann at gmx.de (Sascha Hestermann) Date: Sat, 1 Oct 2016 17:02:39 +0200 Subject: [Lazarus] that's surprised me a lot In-Reply-To: References: <00002e1b49a2$abce09e1$02b207d2$@gmx.de> Message-ID: <4c946d3c-147a-b0fa-d658-6f04755ded6a@gmx.de> Am 01.10.2016 um 13:48 schrieb Shaun via Lazarus: > > sorry to inform you but the link leads to a scam site that has been > doing the rounds for quite some time. That's indeed a spam mail and it wasn't sent by me. As far as I can tell they faked the sender and used my name and mail address. Looking as the source code of the mail reveals it was sent by 109241132252.raciborz.vectranet.pl via mailhost.mobimail.mobitelnet.lk, so no Gmx was involved. Since a few month I have seen several of such mails and also get "Undelivered Mail Returned to Sender" mail from time to time for mails I did not sent. I don't think I can do anything about that as the mails are neither send by me nor by my computer. From info at voiceliveeditor.com Sat Oct 1 18:01:58 2016 From: info at voiceliveeditor.com (info at voiceliveeditor.com) Date: Sat, 1 Oct 2016 17:01:58 +0100 Subject: [Lazarus] that's surprised me a lot In-Reply-To: <4c946d3c-147a-b0fa-d658-6f04755ded6a@gmx.de> References: <00002e1b49a2$abce09e1$02b207d2$@gmx.de> <4c946d3c-147a-b0fa-d658-6f04755ded6a@gmx.de> Message-ID: Hi Sounds like backscatter mail; Sender is spoofing your email; as long as you have valid spf, and dkim for the sending domain the spoofed email should be picked up by most well configured mail server as not originating from sender and not deliver; sometimes the mail server may send a message back to your server informing you that an email was received that failed spf and dkim and was not delivered. An analogy would be somebody sending a letter to an unknown person and placing your home address as the sender on the envelope; the person it was sent to opens it; and send back 'return to sender'; you then get the letter as your home address is on the letter,having not sent it in the first place, very annoying. Sometimes an email or domain can be attacked in this way to send out spam/viruses etc, and by having valid spf/dkim etc should reduce the possibility of this happening; however one thing that you will need to check regularly is that you do not get black listed use something like mxtoolbox to check your domain is not black listed; as if your getting attacked in this way and spam/viruses are 'appearing' to come from your domain; mail servers can be configured to auto report this activity to the likes of protected sky etc causing a blacklisting; once your blacklisted you will have problems sending to the likes of hotmail,gmail,aol,yahoo etc as well as company mail servers that use these blacklisting services as blacklist filters. if you getting problems sending to gmail/yahoo/hotmail,outlook, live etc. Make sure that you have signed up to the bulk mail sending service ( or something like that; it is specific to each one so may take some googling) so that they do not block you dead; hotmail,outlook,live etc if you get black listed can take some time to get cleared as it is not automated and is done by human and you will have to jump through some hoops to clear it. I come across this a lot; it seems to have escalated in the last 6 months. I have one mail server that is only confirming less than 0.2% as valid emails a months; the rest 99.8% is backscatter/spoofed emails; that you have no control over as you have not sent them. On this one server it was getting blacklisted twice a week; I even took the server down for a 2 week period; and it was getting blacklisted during this period. Just food for thought. Might be of use. -----Original Message----- From: Sascha Hestermann via Lazarus Sent: Saturday, October 01, 2016 4:02 PM To: Lazarus mailing list Cc: Sascha Hestermann Subject: Re: [Lazarus] that's surprised me a lot Am 01.10.2016 um 13:48 schrieb Shaun via Lazarus: > > sorry to inform you but the link leads to a scam site that has been > doing the rounds for quite some time. That's indeed a spam mail and it wasn't sent by me. As far as I can tell they faked the sender and used my name and mail address. Looking as the source code of the mail reveals it was sent by 109241132252.raciborz.vectranet.pl via mailhost.mobimail.mobitelnet.lk, so no Gmx was involved. Since a few month I have seen several of such mails and also get "Undelivered Mail Returned to Sender" mail from time to time for mails I did not sent. I don't think I can do anything about that as the mails are neither send by me nor by my computer. -- _______________________________________________ Lazarus mailing list Lazarus at lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus From list2010 at BrenemanLabs.com Sat Oct 1 18:18:00 2016 From: list2010 at BrenemanLabs.com (Paul Breneman) Date: Sat, 1 Oct 2016 11:18:00 -0500 Subject: [Lazarus] that's surprised me a lot In-Reply-To: References: <00002e1b49a2$abce09e1$02b207d2$@gmx.de> <4c946d3c-147a-b0fa-d658-6f04755ded6a@gmx.de> Message-ID: I've used AuthSMTP for years to send all of my email to avoid black list problems. On 10/01/2016 11:01 AM, Josh via Lazarus wrote: > Hi > > Sounds like backscatter mail; > Sender is spoofing your email; as long as you have valid spf, and dkim > for the sending domain the spoofed email should be picked up by most > well configured mail server as not originating from sender and not > deliver; sometimes the mail server may send a message back to your > server informing you that an email was received that failed spf and dkim > and was not delivered. > > An analogy would be somebody sending a letter to an unknown person and > placing your home address as the sender on the envelope; the person it > was sent to opens it; and send back 'return to sender'; you then get the > letter as your home address is on the letter,having not sent it in the > first place, very annoying. > > Sometimes an email or domain can be attacked in this way to send out > spam/viruses etc, and by having valid spf/dkim etc should reduce the > possibility of this happening; however one thing that you will need to > check regularly is that you do not get black listed use something like > mxtoolbox to check your domain is not black listed; as if your getting > attacked in this way and spam/viruses are 'appearing' to come from your > domain; mail servers can be configured to auto report this activity to > the likes of protected sky etc causing a blacklisting; once your > blacklisted you will have problems sending to the likes of > hotmail,gmail,aol,yahoo etc as well as company mail servers that use > these blacklisting services as blacklist filters. > > if you getting problems sending to gmail/yahoo/hotmail,outlook, live > etc. Make sure that you have signed up to the bulk mail sending service > ( or something like that; it is specific to each one so may take some > googling) so that they do not block you dead; hotmail,outlook,live etc > if you get black listed can take some time to get cleared as it is not > automated and is done by human and you will have to jump through some > hoops to clear it. > > I come across this a lot; it seems to have escalated in the last 6 > months. I have one mail server that is only confirming less than 0.2% as > valid emails a months; the rest 99.8% is backscatter/spoofed emails; > that you have no control over as you have not sent them. On this one > server it was getting blacklisted twice a week; I even took the server > down for a 2 week period; and it was getting blacklisted during this > period. > > Just food for thought. > Might be of use. > > -----Original Message----- From: Sascha Hestermann via Lazarus > Sent: Saturday, October 01, 2016 4:02 PM > To: Lazarus mailing list > Cc: Sascha Hestermann > Subject: Re: [Lazarus] that's surprised me a lot > > Am 01.10.2016 um 13:48 schrieb Shaun via Lazarus: >> >> sorry to inform you but the link leads to a scam site that has been >> doing the rounds for quite some time. > > That's indeed a spam mail and it wasn't sent by me. As far as I can tell > they faked the sender and used my name and mail address. > > Looking as the source code of the mail reveals it was sent by > 109241132252.raciborz.vectranet.pl via mailhost.mobimail.mobitelnet.lk, > so no Gmx was involved. > > Since a few month I have seen several of such mails and also get > "Undelivered Mail Returned to Sender" mail from time to time for mails I > did not sent. > > I don't think I can do anything about that as the mails are neither send > by me nor by my computer. From coppolastudio at gmail.com Sat Oct 1 18:44:34 2016 From: coppolastudio at gmail.com (Salvatore) Date: Sat, 01 Oct 2016 18:44:34 +0200 Subject: [Lazarus] that's surprised me a lot Message-ID: <1c82tyrw0n70b5gud1ans7pf.1475340274309@email.android.com> If you are from windows a good antivirus can help Sascha Hestermann via Lazarus ha scritto: >Am 01.10.2016 um 13:48 schrieb Shaun via Lazarus: >> >> sorry to inform you but the link leads to a scam site that has been >> doing the rounds for quite some time. > >That's indeed a spam mail and it wasn't sent by me. As far as I can tell >they faked the sender and used my name and mail address. > >Looking as the source code of the mail reveals it was sent by >109241132252.raciborz.vectranet.pl via mailhost.mobimail.mobitelnet.lk, >so no Gmx was involved. > >Since a few month I have seen several of such mails and also get >"Undelivered Mail Returned to Sender" mail from time to time for mails I >did not sent. > >I don't think I can do anything about that as the mails are neither send >by me nor by my computer. >-- >_______________________________________________ >Lazarus mailing list >Lazarus at lists.lazarus-ide.org >http://lists.lazarus-ide.org/listinfo/lazarus From wkitty42 at windstream.net Sat Oct 1 18:56:21 2016 From: wkitty42 at windstream.net (wkitty42 at windstream.net) Date: Sat, 1 Oct 2016 12:56:21 -0400 Subject: [Lazarus] Messages from who? In-Reply-To: <15780460950.d282115080110.8625057439301242800@moosemail.net> References: <157801f49b7.10d86ee9978628.5148273957526266804@moosemail.net> <15780460950.d282115080110.8625057439301242800@moosemail.net> Message-ID: <57ab6bb0-3531-a1ba-ded0-b575bde6d9d4@windstream.net> On 10/01/2016 08:44 AM, DougC via Lazarus wrote: > Yes, DougC is me but I see lazarus at lists.lazarus-ide.org > in FROM: so I guess it's my email client > doing this. Sigh. Sorry about the noise! no... the list was changed due to the email security stuff that some major ISPs now require... they were refusing to pass on list messages with from address of users instead of the list... they were viewed as forgeries even though they were not... depending on which button you click to reply to a post, the To: or CC: lines may include the list as well as the original poster... at least one button should reply off-list to the original poster but that one may be broken now and simply requires manual intervention to place the original poster's email address in the field in place of the list's email address... -- NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list* unless private contact is specifically requested and granted. From doug at moosemail.net Sat Oct 1 18:59:57 2016 From: doug at moosemail.net (DougC) Date: Sat, 01 Oct 2016 12:59:57 -0400 Subject: [Lazarus] Messages from who? In-Reply-To: <57ab6bb0-3531-a1ba-ded0-b575bde6d9d4@windstream.net> References: <157801f49b7.10d86ee9978628.5148273957526266804@moosemail.net> <15780460950.d282115080110.8625057439301242800@moosemail.net> <57ab6bb0-3531-a1ba-ded0-b575bde6d9d4@windstream.net> Message-ID: <15781302039.113b9800386763.382386366700546298@moosemail.net> I have no problem figuring out how to reply to the place I want to reply to. The problem I have is seeing who the original sender was. There is nothing in the way the messages are presented to me that indicates the original author. Doug C. ---- On Sat, 01 Oct 2016 12:56:21 -0400wkitty42--- via Lazarus <lazarus at lists.lazarus-ide.org> wrote ---- On 10/01/2016 08:44 AM, DougC via Lazarus wrote: > Yes, DougC is me but I see lazarus at lists.lazarus-ide.org > <mailto:lazarus at lists.lazarus-ide.org> in FROM: so I guess it's my email client > doing this. Sigh. Sorry about the noise! no... the list was changed due to the email security stuff that some major ISPs now require... they were refusing to pass on list messages with from address of users instead of the list... they were viewed as forgeries even though they were not... depending on which button you click to reply to a post, the To: or CC: lines may include the list as well as the original poster... at least one button should reply off-list to the original poster but that one may be broken now and simply requires manual intervention to place the original poster's email address in the field in place of the list's email address... -- NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- _______________________________________________ Lazarus mailing list Lazarus at lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: From info at voiceliveeditor.com Sat Oct 1 19:09:29 2016 From: info at voiceliveeditor.com (info at voiceliveeditor.com) Date: Sat, 1 Oct 2016 18:09:29 +0100 Subject: [Lazarus] COCOA Graphics Message-ID: <58C532E41FD247BA9884D9C2AC9AB92A@ianPC> Not sure if this list is the place to post issues using COCOA I have tried laz 1.6 fpc 3.0.1 with fixes and laz 1.7 fpc 3.1.1 trunk I have a problem, I thought was with bgrabitmap but after some test it appears problem is lower down with image create. If I place a timage on a form and compile for carbon all is fine; image is shown. If I change to Cocoa X64, it compiles and run but no image is shown. Any ideas of a fix; or how to report -------------------------------------------------------------------------------- This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify info at voiceliveeditor.com. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. Voiceliveeditor.com accepts no liability for the content of this email, or for the consequences of any actions taken on the basis of the information provided. -------------------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From wkitty42 at windstream.net Sat Oct 1 19:43:22 2016 From: wkitty42 at windstream.net (wkitty42 at windstream.net) Date: Sat, 1 Oct 2016 13:43:22 -0400 Subject: [Lazarus] Messages from who? In-Reply-To: <15781302039.113b9800386763.382386366700546298@moosemail.net> References: <157801f49b7.10d86ee9978628.5148273957526266804@moosemail.net> <15780460950.d282115080110.8625057439301242800@moosemail.net> <57ab6bb0-3531-a1ba-ded0-b575bde6d9d4@windstream.net> <15781302039.113b9800386763.382386366700546298@moosemail.net> Message-ID: <92eca18f-4cc5-7548-2642-56e36e8e000c@windstream.net> On 10/01/2016 12:59 PM, DougC via Lazarus wrote: > I have no problem figuring out how to reply to the place I want to reply to. i wasn't sure... some readers operate in different ways... t-bird, i know, has reply, reply list and reply all... > The problem I have is seeing who the original sender was. There is nothing in > the way the messages are presented to me that indicates the original author. are you not at moosemail dot net? i guess the answer to your question is yes, the CC field is the original poster... this reply will (should) likely carry a CC with my email address at windstream dot net after it is processed by the list server... -- NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list* unless private contact is specifically requested and granted. From aradeonas at operamail.com Sun Oct 2 14:39:51 2016 From: aradeonas at operamail.com (Aradeonas) Date: Sun, 02 Oct 2016 05:39:51 -0700 Subject: [Lazarus] Helper for arrays Message-ID: <1475411991.1155124.743348489.4E9D1796@webmail.messagingengine.com> Hi, Can I have or make helper for arrays? like making Count property so I can use it instead of Length ? For example : > IntegerArray : array of integer; > .... > for i:= to IntegerArray.Count -1 do > .... Regards, Ara -- http://www.fastmail.com - The professional email service -------------- next part -------------- An HTML attachment was scrubbed... URL: From doug at moosemail.net Sun Oct 2 14:46:07 2016 From: doug at moosemail.net (DougC) Date: Sun, 02 Oct 2016 08:46:07 -0400 Subject: [Lazarus] Helper for arrays In-Reply-To: <1475411991.1155124.743348489.4E9D1796@webmail.messagingengine.com> References: <1475411991.1155124.743348489.4E9D1796@webmail.messagingengine.com> Message-ID: <157856e19fe.f71458d8101838.6006208781338060953@moosemail.net> I don't know the answer about helper function but I also dislike Length() for arrays. I solve this dislike by using for i := Low(IntegerArray) to High(IntegerArray) do which covers more possibilities because it handles lower index limit that is non-zero. Low() and High() also work with static arrays so you can use it almost everywhere. Doug C. ---- On Sun, 02 Oct 2016 08:39:51 -0400Aradeonas via Lazarus <lazarus at lists.lazarus-ide.org> wrote ---- Hi, Can I have or make helper for arrays? like making Count property so I can use it instead of Length ? For example : IntegerArray : array of integer; .... for i:= to IntegerArray.Count -1 do .... Regards, Ara -- http://www.fastmail.com - The professional email service -- _______________________________________________ Lazarus mailing list Lazarus at lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: From hnb.code at gmail.com Sun Oct 2 15:45:18 2016 From: hnb.code at gmail.com (Maciej Izak) Date: Sun, 2 Oct 2016 15:45:18 +0200 Subject: [Lazarus] Helper for arrays In-Reply-To: <1475411991.1155124.743348489.4E9D1796@webmail.messagingengine.com> References: <1475411991.1155124.743348489.4E9D1796@webmail.messagingengine.com> Message-ID: 2016-10-02 14:39 GMT+02:00 Aradeonas via Lazarus < lazarus at lists.lazarus-ide.org>: > Can I have or make helper for arrays? like making Count property so I can > use it instead of Length ? Try to use TDynArray dynamic array wrapper provided by mORMot framework. http://synopse.info/files/html/Synopse%20mORMot%20Framework%20SAD%201.18.html#TITL_48 mORMot available out of box: http://newpascal.org -- Best regards, Maciej Izak -------------- next part -------------- An HTML attachment was scrubbed... URL: From lazarus at kluug.net Sun Oct 2 15:59:00 2016 From: lazarus at kluug.net (Ondrej Pokorny) Date: Sun, 2 Oct 2016 15:59:00 +0200 Subject: [Lazarus] Helper for arrays In-Reply-To: <1475411991.1155124.743348489.4E9D1796@webmail.messagingengine.com> References: <1475411991.1155124.743348489.4E9D1796@webmail.messagingengine.com> Message-ID: <8a346859-35b9-44f4-ce81-27307b1abbee@kluug.net> On 02.10.2016 14:39, Aradeonas via Lazarus wrote: > Can I have or make helper for arrays? like making Count property so I > can use it instead of Length ? Yes, you can. FPC 3.0 supports it and Lazarus CodeTools support them as well. Ondrej From aradeonas at operamail.com Sun Oct 2 15:59:07 2016 From: aradeonas at operamail.com (Aradeonas) Date: Sun, 02 Oct 2016 06:59:07 -0700 Subject: [Lazarus] Helper for arrays In-Reply-To: References: <1475411991.1155124.743348489.4E9D1796@webmail.messagingengine.com> Message-ID: <1475416747.1168837.743384985.27764BE9@webmail.messagingengine.com> Thanks DougC I used it before but as I said before I want such helpers. Thanks Maciej as always, I used NewPascal and I liked it but I want to find out FPC is supporting it or not. Regards, Ara -- http://www.fastmail.com - Send your email first class -------------- next part -------------- An HTML attachment was scrubbed... URL: From aradeonas at operamail.com Sun Oct 2 16:00:35 2016 From: aradeonas at operamail.com (Aradeonas) Date: Sun, 02 Oct 2016 07:00:35 -0700 Subject: [Lazarus] Helper for arrays In-Reply-To: <1475416747.1168837.743384985.27764BE9@webmail.messagingengine.com> References: <1475411991.1155124.743348489.4E9D1796@webmail.messagingengine.com> <1475416747.1168837.743384985.27764BE9@webmail.messagingengine.com> Message-ID: <1475416835.1168901.743385193.42EE8678@webmail.messagingengine.com> Ondrej can you point me to a sample? I know I can make helper for array of integer but I want some helpers for all type of arrays. Regards, Ara -- http://www.fastmail.com - Faster than the air-speed velocity of an unladen european swallow -------------- next part -------------- An HTML attachment was scrubbed... URL: From lazarus at kluug.net Sun Oct 2 16:20:33 2016 From: lazarus at kluug.net (Ondrej Pokorny) Date: Sun, 2 Oct 2016 16:20:33 +0200 Subject: [Lazarus] Helper for arrays In-Reply-To: <1475416835.1168901.743385193.42EE8678@webmail.messagingengine.com> References: <1475411991.1155124.743348489.4E9D1796@webmail.messagingengine.com> <1475416747.1168837.743384985.27764BE9@webmail.messagingengine.com> <1475416835.1168901.743385193.42EE8678@webmail.messagingengine.com> Message-ID: On 02.10.2016 16:00, Aradeonas via Lazarus wrote: > I know I can make helper for array of integer This is what I thought you want to. > but I want some helpers for all type of arrays. Hmmm :( I don't know either. Maybe you can raise a discussion / feature request in the fpc-devel mailing list to include type helpers for generic arrays? : program Project1; {$mode objfpc}{$H+} {$modeswitch advancedrecords} {$modeswitch typehelpers} type generic TGenericArray = array of T; TIntArray = specialize TGenericArray; generic TGenericArrayHelper = type helper for TGenericArray public end; begin end. If not added, you'll need to create a generic record wrapper: program Project1; {$mode objfpc}{$H+} {$modeswitch advancedrecords} {$modeswitch typehelpers} type generic TGenericArray = record private FArray: array of T; public function Count: Integer; end; { TGenericArray } function TGenericArray.Count: Integer; begin Result := Length(FArray); end; begin end. Ondrej From hnb.code at gmail.com Sun Oct 2 16:55:07 2016 From: hnb.code at gmail.com (Maciej Izak) Date: Sun, 2 Oct 2016 16:55:07 +0200 Subject: [Lazarus] Helper for arrays In-Reply-To: References: <1475411991.1155124.743348489.4E9D1796@webmail.messagingengine.com> <1475416747.1168837.743384985.27764BE9@webmail.messagingengine.com> <1475416835.1168901.743385193.42EE8678@webmail.messagingengine.com> Message-ID: 2016-10-02 16:20 GMT+02:00 Ondrej Pokorny via Lazarus < lazarus at lists.lazarus-ide.org>: > Maybe you can raise a discussion / feature request in the fpc-devel > mailing list to include type helpers for generic arrays? : This was discussed in Smart Pointers topic: http://free-pascal-general.1045716.n5.nabble.com/Smart-Pointers-td5725159.html -- Best regards, Maciej Izak -------------- next part -------------- An HTML attachment was scrubbed... URL: From aradeonas at operamail.com Sun Oct 2 17:53:21 2016 From: aradeonas at operamail.com (Aradeonas) Date: Sun, 02 Oct 2016 08:53:21 -0700 Subject: [Lazarus] Helper for arrays In-Reply-To: References: <1475411991.1155124.743348489.4E9D1796@webmail.messagingengine.com> <1475416747.1168837.743384985.27764BE9@webmail.messagingengine.com> <1475416835.1168901.743385193.42EE8678@webmail.messagingengine.com> Message-ID: <1475423601.1188782.743441145.247F6899@webmail.messagingengine.com> > Maybe you can raise a discussion / feature request in the fpc-devel > mailing list to include type helpers for generic arrays? So we can have this feature for array it self and should use it for generic arrays? Regards, Ara -- http://www.fastmail.com - A no graphics, no pop-ups email service -------------- next part -------------- An HTML attachment was scrubbed... URL: From octopushole at gmail.com Sun Oct 2 20:45:08 2016 From: octopushole at gmail.com (duilio foschi) Date: Sun, 2 Oct 2016 20:45:08 +0200 Subject: [Lazarus] Plivo API Message-ID: I am wetting my feet in Plivo API (www.plivo.com). " Plivo communicates with remote applications built by businesses through a series of API calls. These back and forth calls between Plivo and other applications are communicated through XML (Extensible Markup Language). " Say that at a given time Plivo calls application X with HTTPS/Post and passes it a XML file. I need to write a minimal application X in Lazarus that will write the XML file to disk Could you point me to some sample code possibly using Synapse ? Thank you Peppe Polpo From m.e.sanliturk at gmail.com Sun Oct 2 20:54:14 2016 From: m.e.sanliturk at gmail.com (Mehmet Erol Sanliturk) Date: Sun, 2 Oct 2016 11:54:14 -0700 Subject: [Lazarus] Plivo API In-Reply-To: References: Message-ID: On Sun, Oct 2, 2016 at 11:45 AM, duilio foschi via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > I am wetting my feet in Plivo API (www.plivo.com). > > " > Plivo communicates with remote applications built by businesses > through a series of API calls. These back and forth calls between > Plivo and other applications are communicated through XML (Extensible > Markup Language). > " > > Say that at a given time Plivo calls application X with HTTPS/Post and > passes it a XML file. > > I need to write a minimal application X in Lazarus that will write the > XML file to disk > > Could you point me to some sample code possibly using Synapse ? > > Thank you > > Peppe Polpo > -- > _______________________________________________ > Perhaps the following sites may be useful : www.aggpas.org www.antigrain.com In them , there are some XML ( expat , etc. ) related files . Be careful about licenses of releases . Mehmet Erol Sanliturk -------------- next part -------------- An HTML attachment was scrubbed... URL: From nc-gaertnma at netcologne.de Sun Oct 2 21:36:10 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Sun, 2 Oct 2016 21:36:10 +0200 Subject: [Lazarus] Plivo API In-Reply-To: References: Message-ID: <20161002213610.188f13c6@limapholos.matflo.wg> On Sun, 2 Oct 2016 20:45:08 +0200 duilio foschi via Lazarus wrote: > I am wetting my feet in Plivo API (www.plivo.com). > > " > Plivo communicates with remote applications built by businesses > through a series of API calls. These back and forth calls between > Plivo and other applications are communicated through XML (Extensible > Markup Language). > " > > Say that at a given time Plivo calls application X with HTTPS/Post and > passes it a XML file. > > I need to write a minimal application X in Lazarus that will write the > XML file to disk > > Could you point me to some sample code possibly using Synapse ? You don't need Synapse if you only need to download a file. FPC provides a HTTP client: function DownloadText(const URL: string): TStrings; var client: TFPHTTPClient; doc: TStringList; begin Result:=nil; doc:=TStringList.Create; client:=TFPHTTPClient.Create(nil); try client.Get(URL,doc); Result:=doc; doc:=nil; finally doc.Free; client.Free; end; end; Mattias From octopushole at gmail.com Mon Oct 3 08:36:03 2016 From: octopushole at gmail.com (duilio foschi) Date: Mon, 3 Oct 2016 08:36:03 +0200 Subject: [Lazarus] Plivo API In-Reply-To: <20161002213610.188f13c6@limapholos.matflo.wg> References: <20161002213610.188f13c6@limapholos.matflo.wg> Message-ID: Hi Mattias, your code shows what Plivo probably does :) After recording a call, Plivo will call my remote application X (I will write the URI of X in a configuration file) with Https/Post. At the time of the request Plivo passes the URI of a MP3 file to application X. This information is written in a XML file, but lets say a text file just to hide details. I need to write application X. This application X wont make calls, but will be called from 3th party software (Plivo). How do I read the parameters passed when a Https/Post request is done to my code ? Thank you Peppe 2016-10-02 21:36 GMT+02:00 Mattias Gaertner via Lazarus : > On Sun, 2 Oct 2016 20:45:08 +0200 > duilio foschi via Lazarus wrote: > >> I am wetting my feet in Plivo API (www.plivo.com). >> >> " >> Plivo communicates with remote applications built by businesses >> through a series of API calls. These back and forth calls between >> Plivo and other applications are communicated through XML (Extensible >> Markup Language). >> " >> >> Say that at a given time Plivo calls application X with HTTPS/Post and >> passes it a XML file. >> >> I need to write a minimal application X in Lazarus that will write the >> XML file to disk >> >> Could you point me to some sample code possibly using Synapse ? > > You don't need Synapse if you only need to download a file. FPC > provides a HTTP client: > > function DownloadText(const URL: string): TStrings; > var > client: TFPHTTPClient; > doc: TStringList; > begin > Result:=nil; > doc:=TStringList.Create; > client:=TFPHTTPClient.Create(nil); > try > client.Get(URL,doc); > Result:=doc; > doc:=nil; > finally > doc.Free; > client.Free; > end; > end; > > > Mattias > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus From nc-gaertnma at netcologne.de Mon Oct 3 10:38:23 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Mon, 3 Oct 2016 10:38:23 +0200 Subject: [Lazarus] Plivo API In-Reply-To: References: <20161002213610.188f13c6@limapholos.matflo.wg> Message-ID: <20161003103823.72409830@limapholos.matflo.wg> On Mon, 3 Oct 2016 08:36:03 +0200 duilio foschi via Lazarus wrote: > Hi Mattias, > > your code shows what Plivo probably does :) Sorry. I misunderstood. I don't know if TFPHttpServer already supports HTTPS. Mattias From m-w-vogel at gmx.de Mon Oct 3 19:01:25 2016 From: m-w-vogel at gmx.de (Michael W. Vogel) Date: Mon, 3 Oct 2016 19:01:25 +0200 Subject: [Lazarus] TPageControl OnChange calling issue Message-ID: Hi, we want to discuss a bug report http://bugs.freepascal.org/view.php?id=25554 here, not in Mantis (hope, I understand Bart right). Today, the TPageControl.OnChange event behave different in Lazarus than in Delphi. In Delphi it is only called (so the bug report), if the user change the page. In Lazarus it is also called, when the page is changed by code. I like (need) the behaviour in Lazarus, cause I mostly use blank TPageControls, with dynamic added pages and filled with dynamic created TFrames (created on demand). So for me it isn't important, if the user select a page or it is selected by code, I need the OnChange event to create or initialize the TFrame. If I understand Bart right, he had a fix for that bug report, but than the behaviour now is gone. I would prefer a option like nboCallPageChangeByCodeSelection to keep the current behaviour (so it doesn't break Lazarus code). A other possibility would be a new event like OnChangePage (as a replacement for the current Lazarus TPageControl.OnChange). I wouldn't throw the current (in my eyes: better) behaviour away. What is your opinion? Kind regards Michl From lazarus at kluug.net Mon Oct 3 19:34:32 2016 From: lazarus at kluug.net (Ondrej Pokorny) Date: Mon, 3 Oct 2016 19:34:32 +0200 Subject: [Lazarus] TPageControl OnChange calling issue In-Reply-To: References: Message-ID: <461d7252-e807-64a1-7da4-ca251cf603c8@kluug.net> On 03.10.2016 19:01, Michael W. Vogel via Lazarus wrote: > Hi, > > we want to discuss a bug report > http://bugs.freepascal.org/view.php?id=25554 here, not in Mantis > (hope, I understand Bart right). > > Today, the TPageControl.OnChange event behave different in Lazarus > than in Delphi. In Delphi it is only called (so the bug report), if > the user change the page. In Lazarus it is also called, when the page > is changed by code. Isn't TTabSheet.OnShow enough for you? Ondrej From m-w-vogel at gmx.de Mon Oct 3 20:03:39 2016 From: m-w-vogel at gmx.de (Michael W. Vogel) Date: Mon, 3 Oct 2016 20:03:39 +0200 Subject: [Lazarus] TPageControl OnChange calling issue In-Reply-To: <461d7252-e807-64a1-7da4-ca251cf603c8@kluug.net> References: <461d7252-e807-64a1-7da4-ca251cf603c8@kluug.net> Message-ID: <0d7c0371-9260-29e1-eb94-731be7c493f5@gmx.de> Am 03.10.2016 um 19:34 schrieb Ondrej Pokorny via Lazarus: > Isn't TTabSheet.OnShow enough for you? > > Ondrej Interesting approach! I've just tested it in one of my apps and yes, it seems to work too. So this could be a obviously better solution for me. Thank you for that hint! Kind regards Michl From bartjunk64 at gmail.com Mon Oct 3 22:51:26 2016 From: bartjunk64 at gmail.com (Bart) Date: Mon, 3 Oct 2016 22:51:26 +0200 Subject: [Lazarus] TPageControl OnChange calling issue In-Reply-To: References: Message-ID: On 10/3/16, Michael W. Vogel via Lazarus wrote: > If I understand Bart right, he had a fix for that bug report, Not yet ;-) Bart From bartjunk64 at gmail.com Mon Oct 3 22:53:39 2016 From: bartjunk64 at gmail.com (Bart) Date: Mon, 3 Oct 2016 22:53:39 +0200 Subject: [Lazarus] TPageControl OnChange calling issue In-Reply-To: References: Message-ID: On 10/3/16, Michael W. Vogel via Lazarus wrote: OT reply: I can't see you on contributors list? Bart From mailinglists at collins-email.co.uk Mon Oct 3 23:17:05 2016 From: mailinglists at collins-email.co.uk (Martin Collins) Date: Mon, 3 Oct 2016 22:17:05 +0100 Subject: [Lazarus] Dynamic Form Components - SynEdit Help Please... Message-ID: <3754917a-3f6a-8057-b12e-aff5359065a6@collins-email.co.uk> I apologise for emailing but need a little bit of help please. Creating form components dynamically is a new area of pascal programming for me and I have become stuck. My application is supposed to be an editor that can open multiple files for editing. I have a page control and when opening a new file I add a page and place a synedit on the page on it's own, into which the file is loaded. The loading works fine - I create a stringlist, loadfromfile, then SetObjectProp(Component, PropInfo['Lines'], StringList). StringList.Free works without error. However, when I try to save the file the following code works, insomuch the file is saved to disk, but the application crashes when trying to free the stringlist (HTMLFile.Free) with the error 'Project raised exception class 'External: SIGSEGV' At address 4201C3'. If I don't free the stringlist, the application does not crash but I'm left with a memory leak as indicated in my heap.trc file. I have a feeling that HTMLFile is not actually a stringlist, I'm just forcing it to be one here - HTMLFile := TStringList(GetObjectProp(Comp, PropInfo, TStrings)); If that's the case, how can I get and/or save the text from the dynamically created synedit. This has been puzzling me for days now!!!! Many thanks for your help. Martin Collins Using Lazarus 1.6, FPC 3.0.0, Linux x86_64 gtk2 #### procedure TMainForm.SaveSynEdit(ThisPage: Integer); var HTMLFile: TStringList; Filename: String; Comp : TComponent; PropInfo: PPropInfo; begin FileSaveDialog.Title:= 'Save File...'; FileSaveDialog.DefaultExt := 'html'; //default extension FileSaveDialog.Filter := 'HTML source file|*.html'; Filename:= FileList[ThisPage]; FileSaveDialog.FileName:= Filename + '.html'; If FileSaveDialog.Execute then begin HTMLFile:= TStringList.Create; Comp := PageControlEditor.ActivePage.Controls[0]; If Comp is TWinControl then begin If IsPublishedProp(Comp, 'Lines') then begin PropInfo := GetPropInfo(Comp, 'Lines', [tkClass]); HTMLFile := TStringList(GetObjectProp(Comp, PropInfo, TStrings)); Filename:= FileSaveDialog.FileName; HTMLFile.SaveToFile(Filename); HTMLFile.Free; FileList[ThisPage]:= Filename; PageControlEditor.ActivePage.Caption:= ExtractFileName(Filename); PageControlEditor.ActivePage.Font.Style:= []; PageControlEditor.ActivePage.Font.Color:= clDefault; end; end; end; end; From nc-gaertnma at netcologne.de Mon Oct 3 23:46:59 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Mon, 3 Oct 2016 23:46:59 +0200 Subject: [Lazarus] Dynamic Form Components - SynEdit Help Please... In-Reply-To: <3754917a-3f6a-8057-b12e-aff5359065a6@collins-email.co.uk> References: <3754917a-3f6a-8057-b12e-aff5359065a6@collins-email.co.uk> Message-ID: <20161003234659.37f1ac3d@limapholos.matflo.wg> On Mon, 3 Oct 2016 22:17:05 +0100 Martin Collins via Lazarus wrote: >[...] You didn't wrote, why you need RTTI. Simply access the TSynEdit: procedure TMainForm.SaveSynEdit(ThisPage: Integer); var HTMLFile: TStringList; Filename: String; Comp : TComponent; PropInfo: PPropInfo; aSynEdit: TSynEdit; begin FileSaveDialog.Title:= 'Save File...'; FileSaveDialog.DefaultExt := 'html'; //default extension FileSaveDialog.Filter := 'HTML source file|*.html'; Filename:= FileList[ThisPage]; FileSaveDialog.FileName:= Filename + '.html'; If FileSaveDialog.Execute then begin // HTMLFile:= TStringList.Create; Comp := PageControlEditor.ActivePage.Controls[0]; If Comp is TSynEdit then begin aSynEdit:=TSynEdit(Comp); // If IsPublishedProp(Comp, 'Lines') then // begin // PropInfo := GetPropInfo(Comp, 'Lines', [tkClass]); // HTMLFile := TStringList(GetObjectProp(Comp, PropInfo, TStrings)); Filename:= FileSaveDialog.FileName; aSynEdit.Lines.SaveToFile(Filename); // HTMLFile.Free; FileList[ThisPage]:= Filename; PageControlEditor.ActivePage.Caption:= ExtractFileName(Filename); PageControlEditor.ActivePage.Font.Style:= []; PageControlEditor.ActivePage.Font.Color:= clDefault; // end; end; end; end; Mattias From lazarus at mfriebe.de Mon Oct 3 23:52:08 2016 From: lazarus at mfriebe.de (Martin Frb) Date: Mon, 3 Oct 2016 22:52:08 +0100 Subject: [Lazarus] Dynamic Form Components - SynEdit Help Please... In-Reply-To: <3754917a-3f6a-8057-b12e-aff5359065a6@collins-email.co.uk> References: <3754917a-3f6a-8057-b12e-aff5359065a6@collins-email.co.uk> Message-ID: <177c4b38-b270-8ad3-9c11-88c968f27332@mfriebe.de> See mail from Mattias. On 03/10/2016 22:17, Martin Collins via Lazarus wrote: > > If IsPublishedProp(Comp, 'Lines') then > begin > PropInfo := GetPropInfo(Comp, 'Lines', [tkClass]); SynEdit.Lines is TStrings, not TStringList. > HTMLFile := TStringList(GetObjectProp(Comp, PropInfo, TStrings)); If anything, you get a reference to the SynEdit.LInes object, but you do NOT create a new object here > > HTMLFile.Free; So this then is the same as SynEdit.Lines.Free; And that you should not do. From mailinglists at collins-email.co.uk Tue Oct 4 00:02:12 2016 From: mailinglists at collins-email.co.uk (Martin Collins) Date: Mon, 03 Oct 2016 23:02:12 +0100 Subject: [Lazarus] Dynamic Form Components - SynEdit Help Please... In-Reply-To: <20161003234659.37f1ac3d@limapholos.matflo.wg> Message-ID: <8f46d05e-5c5a-4c27-b550-cd9ee3cbd02a@email.android.com> An HTML attachment was scrubbed... URL: From mailinglists at collins-email.co.uk Tue Oct 4 00:05:29 2016 From: mailinglists at collins-email.co.uk (Martin Collins) Date: Mon, 03 Oct 2016 23:05:29 +0100 Subject: [Lazarus] Dynamic Form Components - SynEdit Help Please... In-Reply-To: <177c4b38-b270-8ad3-9c11-88c968f27332@mfriebe.de> Message-ID: <9d32c7be-fdab-424b-ac1f-04e349dbfcdf@email.android.com> An HTML attachment was scrubbed... URL: From mschnell at lumino.de Tue Oct 4 10:42:55 2016 From: mschnell at lumino.de (Michael Schnell) Date: Tue, 4 Oct 2016 10:42:55 +0200 Subject: [Lazarus] Messages from who? In-Reply-To: <157801f49b7.10d86ee9978628.5148273957526266804@moosemail.net> References: <157801f49b7.10d86ee9978628.5148273957526266804@moosemail.net> Message-ID: <5326445b-d3ef-1a0e-0007-a545694eae77@lumino.de> On 01.10.2016 14:01, DougC via Lazarus wrote: > The FROM field is always the list, itself, now. Seems like a good idea. While Thunderbird has a dedicated "Reply to list" button (which I sometimes failed to hit :-( ), some other mail clients might only allow for "Reply" (unless you want multiple recipients). Now this "reply to sender only" does what is appropriate. -Michael -------------- next part -------------- An HTML attachment was scrubbed... URL: From m-w-vogel at gmx.de Tue Oct 4 13:28:44 2016 From: m-w-vogel at gmx.de (Michael W. Vogel) Date: Tue, 4 Oct 2016 13:28:44 +0200 Subject: [Lazarus] TPageControl OnChange calling issue In-Reply-To: References: Message-ID: <6dd35aa2-24e5-0eee-f02e-ca8feeff84a9@gmx.de> Am 03.10.2016 um 22:53 schrieb Bart via Lazarus: > OT reply: I can't see you on contributors list? > > Bart No, I'm sorry, I'm not a Lazarus developer. > >> If I understand Bart right, he had a fix for that bug report, > Not yet ;-) > > Bart Ah, OK. I inserted the solution from Ondrej in my current project and it really seems to be the better approach. If there is no other opinion to that topic, you can ignore my initial hint. Now, there is only the gap of Lazarus and Delphi compatibility versus Lazarus consistency. I don't know, how many other Lazarus user use the TPageControl.OnChange event in the same manner as I do. If no one else, there is no barrier to change it to Delphis behaviour ;) Offtopic: Maybe is Delphis behaviour not really consistent. For example, TEdit.OnChange is fired, if the TEdit.Text is changed by user or code. Kind regards Michl From getmem1 at gmail.com Tue Oct 4 14:11:03 2016 From: getmem1 at gmail.com (=?UTF-8?B?QmFsw6F6cyBTesOpa2VseQ==?=) Date: Tue, 4 Oct 2016 15:11:03 +0300 Subject: [Lazarus] Online Package Manager Message-ID: Hi, I decided to implement the online package manager(opkman) or at least give it a try. The first stable(alpha) version is ready and it works like this: the packages are zipped and stored in a webserver(repository) along with a json file. I chose zip to minimize server load. The json file contains all the necessary info about the packages. Once installed into the IDE, the opkman downloads, then serialize the json file into a package list. The list is displayed in a tree. On request the packages can be downloaded or/and installed. For now the repository is read-only, it contains only eight, well known(I guess?) packages. The nature/type of the eight package is irrelevant for now, since we are only testing the functionality of the opkman. Few notes: 1. Supported versions: Laz 1.6+(FPC 3.0.0+). I did the implementation/testing with Lazarus trunk(FPC 3.0.0) 2. Tested under the following widgetsets: Win32/64, GTK2, Carbon 3. After install, you can find opkman in the "Package" menu 4. Download link: https://drive.google.com/file/d/0B9Me_c5onmWoVXU3Y1N2dk8xWDQ/view?usp=sharing Please test! Suggestions are welcome. PS: Big thanks to @Leledumbo for hosting the repository. regards, Balázs -------------- next part -------------- An HTML attachment was scrubbed... URL: From mailinglists at geldenhuys.co.uk Tue Oct 4 14:35:55 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Tue, 4 Oct 2016 13:35:55 +0100 Subject: [Lazarus] Online Package Manager In-Reply-To: References: Message-ID: On 2016-10-04 13:11, Balázs Székely via Lazarus wrote: > I decided to implement the online package manager(opkman) or at least give > it a try. Not to deter from all your efforts, but I think there is already a brilliant solution called "Delphinus". It is an open-source replacement to the ridiculous one included with newer Delphi versions as standard. All that would be required is to port that code to work with Lazarus IDE (instead of Delphi IDE - or possible work with both IDE's). So, what's the benefit of Delphinus: * there is _no_ central repository! * You can publish new project without notifying the Delphinus author * It hooks into the Github API, so everything is automated. * You can have a console app or IDE add-on to install packages. See the second link for how simple it is to publish a new project. Delpinus (website and code repository) https://github.com/Memnarch/Delphinus Publishing your Project for Delphinus https://github.com/Memnarch/Delphinus 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 bartjunk64 at gmail.com Tue Oct 4 17:02:37 2016 From: bartjunk64 at gmail.com (Bart) Date: Tue, 4 Oct 2016 17:02:37 +0200 Subject: [Lazarus] TPageControl OnChange calling issue In-Reply-To: <6dd35aa2-24e5-0eee-f02e-ca8feeff84a9@gmx.de> References: <6dd35aa2-24e5-0eee-f02e-ca8feeff84a9@gmx.de> Message-ID: On 10/4/16, Michael W. Vogel via Lazarus wrote: > Offtopic: Maybe is Delphis behaviour not really consistent. For example, > TEdit.OnChange is fired, if the TEdit.Text is changed by user or code. I agree, same inconsistency in Lazarus e.g. OnSelectionChanged for TRadioGroup is fired when ItemIndexis changed in code. Bart From getmem1 at gmail.com Tue Oct 4 18:00:19 2016 From: getmem1 at gmail.com (=?UTF-8?B?QmFsw6F6cyBTesOpa2VseQ==?=) Date: Tue, 4 Oct 2016 19:00:19 +0300 Subject: [Lazarus] Online Package Manager In-Reply-To: References: Message-ID: Hi Graeme, Thanks for the feedback! "Delphinus" is indeed an interesting project, let's hope somebody will have the time and energy to convert it to Lazarus. Personally I prefer a central repository, so each package can be checked individually. I'm not a control freak, I just want to make sure that each package in the repository can be compiled/installed. Balázs On Tue, Oct 4, 2016 at 3:35 PM, Graeme Geldenhuys via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > On 2016-10-04 13:11, Balázs Székely via Lazarus wrote: > > I decided to implement the online package manager(opkman) or at least > give > > it a try. > > Not to deter from all your efforts, but I think there is already a > brilliant solution called "Delphinus". It is an open-source replacement > to the ridiculous one included with newer Delphi versions as standard. > > All that would be required is to port that code to work with Lazarus IDE > (instead of Delphi IDE - or possible work with both IDE's). > > So, what's the benefit of Delphinus: > * there is _no_ central repository! > * You can publish new project without notifying the Delphinus > author > * It hooks into the Github API, so everything is automated. > * You can have a console app or IDE add-on to install > packages. > > See the second link for how simple it is to publish a new project. > > Delpinus (website and code repository) > https://github.com/Memnarch/Delphinus > > Publishing your Project for Delphinus > https://github.com/Memnarch/Delphinus > > > > 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 > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From silvioprog at gmail.com Tue Oct 4 18:43:18 2016 From: silvioprog at gmail.com (silvioprog) Date: Tue, 4 Oct 2016 13:43:18 -0300 Subject: [Lazarus] Online Package Manager In-Reply-To: References: Message-ID: On Tue, Oct 4, 2016 at 9:11 AM, Balázs Székely via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > Hi, > > I decided to implement the online package manager(opkman) or at least > give it a try. The first stable(alpha) version is ready and it works like > this: the packages are zipped and stored in a webserver(repository) along > with a json file. I chose zip to minimize server load. The json file > contains all the necessary info about the packages. Once installed into the > IDE, the opkman downloads, then serialize the json file into a package > list. The list is displayed in a tree. On request the packages can be > downloaded or/and installed. For now the repository is read-only, it > contains only eight, well known(I guess?) packages. The nature/type of the > eight package is irrelevant for now, since we are only testing the > functionality of the opkman. Few notes: > > 1. Supported versions: Laz 1.6+(FPC 3.0.0+). I did the > implementation/testing with Lazarus trunk(FPC 3.0.0) > 2. Tested under the following widgetsets: Win32/64, GTK2, Carbon > 3. After install, you can find opkman in the "Package" menu > 4. Download link: https://drive.google.com/file/ > d/0B9Me_c5onmWoVXU3Y1N2dk8xWDQ/view?usp=sharing > > Please test! Suggestions are welcome. > > PS: Big thanks to @Leledumbo for hosting the repository. > > regards, > Balázs > Thanks for sharing it, it's really a great job! :-) Some suggestions: * allow the user to use Lazarus-CCR/Github/Bitbucket/GitLab as component server; (it allows anyone to publish their components) * rename it to something like LazGetIt or LPM (Lazarus package manager) etc., try to send it to be distributed in the Lazarus /components folder, or try to ask Lazarus team about how to improve it, so that it comes installed as default in the official Lazarus IDE; (Lazarus needs a official solution like Delphi's GetIt or Delphinus) * add the "Uninstall", "Remove", "Download" and "Info" buttons; (Uninstall - just uninstall it from Lazarus IDE; Remove - uninstall and remove all downloaded files; Download - just download the component sources without install it; Info - show the component README/overview) * synchronize it to show some already installed component; (it avoid conflict with another installed user component) * allow it to use HTTPS. Anyway, I've not seen the sources, I've just installed it on my IDE taking the following awesome window: https://img42.com/6axLU . -- Silvio Clécio -------------- next part -------------- An HTML attachment was scrubbed... URL: From nc-gaertnma at netcologne.de Tue Oct 4 19:02:11 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Tue, 4 Oct 2016 19:02:11 +0200 Subject: [Lazarus] Online Package Manager In-Reply-To: References: Message-ID: <20161004190211.108e1c06@limapholos.matflo.wg> On Tue, 4 Oct 2016 13:43:18 -0300 silvioprog via Lazarus wrote: >[...] > * rename it to something like LazGetIt or LPM (Lazarus package manager) Note: the IDE's package manager is named Lazarus package manager. Mattias From silvioprog at gmail.com Tue Oct 4 19:07:08 2016 From: silvioprog at gmail.com (silvioprog) Date: Tue, 4 Oct 2016 14:07:08 -0300 Subject: [Lazarus] Online Package Manager In-Reply-To: <20161004190211.108e1c06@limapholos.matflo.wg> References: <20161004190211.108e1c06@limapholos.matflo.wg> Message-ID: On Tue, Oct 4, 2016 at 2:02 PM, Mattias Gaertner via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > On Tue, 4 Oct 2016 13:43:18 -0300 > silvioprog via Lazarus wrote: > > >[...] > > * rename it to something like LazGetIt or LPM (Lazarus package manager) > > Note: the IDE's package manager is named Lazarus package manager. > > Mattias Indeed. :-) -- Silvio Clécio -------------- next part -------------- An HTML attachment was scrubbed... URL: From werner.pamler at freenet.de Tue Oct 4 22:00:43 2016 From: werner.pamler at freenet.de (Werner Pamler) Date: Tue, 4 Oct 2016 22:00:43 +0200 Subject: [Lazarus] TPageControl OnChange calling issue In-Reply-To: References: Message-ID: Could somebody add Michael to the contributor's list? Am 03.10.2016 um 22:53 schrieb Bart via Lazarus: > On 10/3/16, Michael W. Vogel via Lazarus wrote: > > OT reply: I can't see you on contributors list? > > Bart From getmem1 at gmail.com Wed Oct 5 09:29:01 2016 From: getmem1 at gmail.com (=?UTF-8?B?QmFsw6F6cyBTesOpa2VseQ==?=) Date: Wed, 5 Oct 2016 10:29:01 +0300 Subject: [Lazarus] Online Package Manager In-Reply-To: References: Message-ID: @Silvio >allow the user to use Lazarus-CCR/Github/Bitbucket/GitLab as component server; (it allows anyone to publish their components) It would take a lot of effort, the project is already complex, although I only completed about 30%. I might add support for Github later, Delphinus is already there and is a great tool. > rename it to something like LazGetIt or LPM (Lazarus package manager) etc. In my opinion the name is irrelevant for now, it can be renamed later to anything except LazGetit, it sounds like a copy of Delphi's GetIt. It's entirely different project, concept. > add the "Uninstall", "Remove", "Download" and "Info" buttons "Download To" and "Clean up" buttons are already there. I will add the others soon. >synchronize it to show some already installed component; (it avoid conflict with another installed user component) It does show you if the component is installed or not, more over you can see the installed version(the second column, with bold). See attachment. > allow it to use HTTPS Already supported! You need the install the OpenSSL libraries though. Thank you for the feedback. On Tue, Oct 4, 2016 at 7:43 PM, silvioprog via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > On Tue, Oct 4, 2016 at 9:11 AM, Balázs Székely via Lazarus < > lazarus at lists.lazarus-ide.org> wrote: > >> Hi, >> >> I decided to implement the online package manager(opkman) or at least >> give it a try. The first stable(alpha) version is ready and it works like >> this: the packages are zipped and stored in a webserver(repository) along >> with a json file. I chose zip to minimize server load. The json file >> contains all the necessary info about the packages. Once installed into the >> IDE, the opkman downloads, then serialize the json file into a package >> list. The list is displayed in a tree. On request the packages can be >> downloaded or/and installed. For now the repository is read-only, it >> contains only eight, well known(I guess?) packages. The nature/type of the >> eight package is irrelevant for now, since we are only testing the >> functionality of the opkman. Few notes: >> >> 1. Supported versions: Laz 1.6+(FPC 3.0.0+). I did the >> implementation/testing with Lazarus trunk(FPC 3.0.0) >> 2. Tested under the following widgetsets: Win32/64, GTK2, Carbon >> 3. After install, you can find opkman in the "Package" menu >> 4. Download link: https://drive.google.com/file/ >> d/0B9Me_c5onmWoVXU3Y1N2dk8xWDQ/view?usp=sharing >> >> Please test! Suggestions are welcome. >> >> PS: Big thanks to @Leledumbo for hosting the repository. >> >> regards, >> Balázs >> > > > Thanks for sharing it, it's really a great job! :-) > > Some suggestions: > > * allow the user to use Lazarus-CCR/Github/Bitbucket/GitLab as component > server; (it allows anyone to publish their components) > * rename it to something like LazGetIt or LPM (Lazarus package manager) > etc., try to send it to be distributed in the Lazarus /components folder, > or try to ask Lazarus team about how to improve it, so that it comes > installed as default in the official Lazarus IDE; (Lazarus needs a official > solution like Delphi's GetIt or Delphinus) > * add the "Uninstall", "Remove", "Download" and "Info" buttons; (Uninstall > - just uninstall it from Lazarus IDE; Remove - uninstall and remove all > downloaded files; Download - just download the component sources without > install it; Info - show the component README/overview) > * synchronize it to show some already installed component; (it avoid > conflict with another installed user component) > * allow it to use HTTPS. > > Anyway, I've not seen the sources, I've just installed it on my IDE taking > the following awesome window: https://img42.com/6axLU . > > -- > Silvio Clécio > > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: opkmani.png Type: image/png Size: 38383 bytes Desc: not available URL: From mschnell at lumino.de Wed Oct 5 10:00:11 2016 From: mschnell at lumino.de (Michael Schnell) Date: Wed, 5 Oct 2016 10:00:11 +0200 Subject: [Lazarus] TPageControl OnChange calling issue In-Reply-To: <6dd35aa2-24e5-0eee-f02e-ca8feeff84a9@gmx.de> References: <6dd35aa2-24e5-0eee-f02e-ca8feeff84a9@gmx.de> Message-ID: On 04.10.2016 13:28, Michael W. Vogel via Lazarus wrote: > Offtopic: Maybe is Delphis behaviour not really consistent. For > example, TEdit.OnChange is fired, if the TEdit.Text is changed by user > or code. > Maybe an additional property defining the behavior of the appropriate callbacks for all those controls to be "UserAction" "ProgramAction" or "Both", defaulting to the Delphi behavior might be a good idea. -Michael From dec12 at avidsoft.com.hk Wed Oct 5 10:54:58 2016 From: dec12 at avidsoft.com.hk (Dennis) Date: Wed, 5 Oct 2016 16:54:58 +0800 Subject: [Lazarus] Anyone has experience controlling Excel from FPC/delphi via OLE Automation? Message-ID: <57F4BFE2.8030206@avidsoft.com.hk> I am having problem using the Type Library generated. Don't know how to use it. I tried to 'learn' from old Delphi 5 source code (the only version of Delphi I have) that worked with Excel 2000 but found that the type library are so different from the one generated by FPC. Dennis -------------- next part -------------- An HTML attachment was scrubbed... URL: From tony.whyman at mccallumwhyman.com Wed Oct 5 11:04:29 2016 From: tony.whyman at mccallumwhyman.com (Tony Whyman) Date: Wed, 5 Oct 2016 10:04:29 +0100 Subject: [Lazarus] Anyone has experience controlling Excel from FPC/delphi via OLE Automation? In-Reply-To: <57F4BFE2.8030206@avidsoft.com.hk> References: <57F4BFE2.8030206@avidsoft.com.hk> Message-ID: <0b936cda-7efa-0fed-5d79-dcd9efc7bef2@mccallumwhyman.com> Denis, Answer is yes - and only yesterday was I working on such a program. Years ago I did the same from Delphi and used the type libraries. With FPC, the key is to use variants. As an example, I've attached a neat little unit for exporting a DBGrid to an Excel spreadsheet. Regards Tony Whyman MWA unit ExcelWorkbook; {$MODE Delphi} interface uses Classes, SysUtils, variants, DBGrids, DB, Forms; type { TExcelWorkbook } TExcelWorkbook = class private FWorksheet: variant; FWorkbook: variant; FServer: variant; procedure CopyToWorkbook(DBGrid: TDBGrid; aFieldCount: integer); overload; procedure CopyToWorkbook(ds: TDataSet; aFieldCount: integer); overload; procedure SetCell(Row,Col: integer; aText: string); procedure WriteFieldList(Fields: TFields; FieldCount: integer); procedure WriteRecord(DataSet: TDataSet; row, aFieldCount: integer); public constructor Create; destructor Destroy; override; procedure SaveAs(DBGrid: TDBGrid; aWorkbookFile: string); procedure OpenInExcel(DBGrid: TDBGrid); end; implementation uses ComObj, CSVGridUnit, memds; const ServerName = 'Excel.Application'; resourcestring sUnknownField = 'Unknown Field Type'; sBadGraphic = 'Unable to generate CSV data for a Graphic Field'; sBadParadox = 'Unable to generate CSV data for a Paradox OLE Field'; sBadDBase = 'Unable to generate CSV data for a DBase OLE Field'; sBadBinary = 'Unable to generate CSV data for a Binary Field'; sBadCursor = 'Unable to generate CSV data for a Cursor Field'; { TExcelWorkbook } procedure TExcelWorkbook.CopyToWorkbook(DBGrid: TDBGrid; aFieldCount: integer); var ds: TMemDataset; i: integer; begin if (DBGrid.DataSource = nil) or (DBGrid.DataSource.DataSet = nil) then raise Exception.Create('Create Excel Workbook: A Dataset must be assigned'); ds := TMemDataset.Create(Application); try ds.Clear(True); AddFileDefs(ds,DBGrid.Columns); ds.CreateTable; ds.Active := true; CopyData(ds,DBGrid.DataSource.DataSet); SetColumnHeadings(ds,DBGrid.Columns); for i := 1 to DBGrid.Columns.Count do FWorksheet.Cells.Item(1,i).ColumnWidth := DBGrid.Columns[i-1].Width div 5; CopyToWorkbook(ds,aFieldCount); finally ds.Free; end; end; procedure TExcelWorkbook.CopyToWorkbook(ds: TDataSet; aFieldCount: integer); var {$IF FPC_FULLVERSION >= 20700 } bk: TBookmark; {$ELSE} bk: TBookmarkStr; {$ENDIF} row: integer; begin row := 2; with ds do begin bk := Bookmark; DisableControls; try if aFieldCount = 0 then aFieldCount := FieldCount; Last; WriteFieldList(Fields,aFieldCount); First; while not EOF do begin WriteRecord(ds,row,aFieldCount); Next; Inc(row); end; finally Bookmark := bk; EnableControls; end; end end; procedure TExcelWorkbook.SetCell(Row, Col: integer; aText: string); var w: WideString; begin w := UTF8Decode(aText); FWorksheet.Cells.Item(Row,Col).Value := w; end; procedure TExcelWorkbook.WriteFieldList(Fields: TFields; FieldCount: integer); var I: integer; begin for I := 0 to FieldCount - 1 do SetCell(1,I+1,Fields[I].FieldName); end; procedure TExcelWorkbook.WriteRecord(DataSet: TDataSet; row, aFieldCount: integer); var I: integer; begin with DataSet do begin for I := 0 to aFieldCount - 1 do begin case Fields[I].DataType of ftUnknown: raise Exception.Create(sUnknownField); ftString: SetCell(row,I+1,Fields[I].AsString); ftSmallint, ftInteger, ftWord, ftLargeInt, ftBoolean: SetCell(row,I+1,Fields[I].DisplayText); ftFloat, ftCurrency, ftFmtBCD, ftBCD: SetCell(row,I+1,Fields[I].AsString); ftDate, ftTime: SetCell(row,I+1,DateTimeToStr(Fields[I].AsDateTime)); ftDateTime: SetCell(row,I+1,Fields[I].AsString); ftBytes, ftVarBytes, ftBlob, ftAutoInc: SetCell(row,I+1,Fields[I].AsString); ftMemo: SetCell(row,I+1,Fields[I].AsString); ftGraphic: raise Exception.Create(sBadGraphic); ftFmtMemo: SetCell(row,I+1,Fields[I].AsString); ftParadoxOle: raise Exception.Create(sBadParadox); ftDBaseOle: raise Exception.Create(sBadDBase); ftTypedBinary:raise Exception.Create(sBadBinary); ftCursor: raise Exception.Create(sBadCursor); end end; end; end; constructor TExcelWorkbook.Create; begin try FServer := CreateOleObject(ServerName); except raise Exception.Create('Unable to start Excel.'); end; FWorkbook := FServer.Workbooks.Add; FWorksheet := FWorkbook.Worksheets.Add; end; destructor TExcelWorkbook.Destroy; begin if not FServer.Visible then begin if not VarIsEmpty(FWorkbook) then FWorkbook.Close(0); {Do not save Changes} FServer.Quit; end; inherited Destroy; end; procedure TExcelWorkbook.SaveAs(DBGrid: TDBGrid; aWorkbookFile: string); var w:widestring; begin CopyToWorkbook(DBGrid,0); w := UTF8Decode(aWorkbookFile); FWorkbook.SaveAs(w); end; procedure TExcelWorkbook.OpenInExcel(DBGrid: TDBGrid); begin FServer.Visible := true; CopyToWorkbook(DBGrid,0); end; end. On 05/10/16 09:54, Dennis via Lazarus wrote: > I am having problem using the Type Library generated. > Don't know how to use it. > > I tried to 'learn' from old Delphi 5 source code (the only version of > Delphi I have) that worked with Excel 2000 but found that the type > library are so different from the one generated by FPC. > > Dennis > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From werner.pamler at freenet.de Wed Oct 5 11:11:29 2016 From: werner.pamler at freenet.de (Werner Pamler) Date: Wed, 5 Oct 2016 11:11:29 +0200 Subject: [Lazarus] Anyone has experience controlling Excel from FPC/delphi via OLE Automation? In-Reply-To: <57F4BFE2.8030206@avidsoft.com.hk> References: <57F4BFE2.8030206@avidsoft.com.hk> Message-ID: <4bd599f6-7eba-826c-0c54-8273b926d047@freenet.de> > I am having problem using the Type Library generated. > Don't know how to use it. > > I tried to 'learn' from old Delphi 5 source code (the only version of > Delphi I have) that worked with Excel 2000 but found that the type > library are so different from the one generated by FPC. > I try to avoid that OLE stuff as much as possible - too much pain... What is the reason why you want to control Excel? Maybe you can achieve the same in a different way. If it's only reading or writing files you should have a look a fpspreadsheet which covers - I'd say - 90% of what is needed (this is not what Excel offers - Excel has always offered more features than were needed). If you insist on Automation you should look at the wiki articles http://wiki.lazarus.freepascal.org/Office_Automation and http://wiki.lazarus.freepascal.org/ExcelAutomation/de - the latter is in German, though. -------------- next part -------------- An HTML attachment was scrubbed... URL: From m-w-vogel at gmx.de Wed Oct 5 11:37:14 2016 From: m-w-vogel at gmx.de (Michael W. Vogel) Date: Wed, 5 Oct 2016 11:37:14 +0200 Subject: [Lazarus] TPageControl OnChange calling issue In-Reply-To: References: <6dd35aa2-24e5-0eee-f02e-ca8feeff84a9@gmx.de> Message-ID: Am 05.10.2016 um 10:00 schrieb Michael Schnell via Lazarus: > Maybe an additional property defining the behavior of the appropriate > callbacks for all those controls to be "UserAction" "ProgramAction" or > "Both", defaulting to the Delphi behavior might be a good idea. > > -Michael Thats sounds interesting! A lot of newbies errors rest upon this, I often can see in the forums, e.g. endless loops: TFooControl.OnChange (called by user) -> change TBarControl.Text TBarControl.OnChange (called by code) -> change TFooControl.Text TFooControl.OnChange (called by code) -> ... Of cause, it would be a big job (for all widgetsets), to implement such a property (FOnChange is inserted on various class places), but IMHO it isn't impossible to do it for useful controls. But I'm not sure, would such a property be accepted by the Lazarus developer? Kind regards Michl From lazarus at kluug.net Wed Oct 5 12:40:16 2016 From: lazarus at kluug.net (Ondrej Pokorny) Date: Wed, 5 Oct 2016 12:40:16 +0200 Subject: [Lazarus] TPageControl OnChange calling issue In-Reply-To: References: <6dd35aa2-24e5-0eee-f02e-ca8feeff84a9@gmx.de> Message-ID: On 05.10.2016 11:37, Michael W. Vogel via Lazarus wrote: > But I'm not sure, would such a property be accepted by the Lazarus > developer? I am against. LCL is designed to be Delphi-compatible so the default events are what they are and they behave how they behave. Furthermore it would be quite hard to make it work on all WS because in a lot of cases you don't get the information from the WS what caused the change. A good example for a problematic component is TComboBox under Win32 (btw. TComboBox.OnClick isn't Delphi compatible either). If you need an "event" when something changed programatically, call a method directly after the change. (Well my opinion may change if you supply good arguments and supply a patch that makes the new "OnChangeEx(Sender: TObject; Reason: TChangeReason)" event work on all major WS for basic controls.) IMO the effort and maintenance don't pay off. Ondrej From mschnell at lumino.de Wed Oct 5 14:07:47 2016 From: mschnell at lumino.de (Michael Schnell) Date: Wed, 5 Oct 2016 14:07:47 +0200 Subject: [Lazarus] TPageControl OnChange calling issue In-Reply-To: References: <6dd35aa2-24e5-0eee-f02e-ca8feeff84a9@gmx.de> Message-ID: <4c2aaa88-6c76-f8a4-a963-98dcd001d332@lumino.de> On 05.10.2016 12:40, Ondrej Pokorny via Lazarus wrote: > > I am against. LCL is designed to be Delphi-compatible so the default > events are what they are and they behave how they behave. This of course is granted by a property that is not existing in Delphi and defaults to the Delphi behavior. -Michael From dec12 at avidsoft.com.hk Wed Oct 5 18:19:07 2016 From: dec12 at avidsoft.com.hk (Dennis) Date: Thu, 6 Oct 2016 00:19:07 +0800 Subject: [Lazarus] Anyone has experience controlling Excel from FPC/delphi via OLE Automation? In-Reply-To: <4bd599f6-7eba-826c-0c54-8273b926d047@freenet.de> References: <57F4BFE2.8030206@avidsoft.com.hk> <4bd599f6-7eba-826c-0c54-8273b926d047@freenet.de> Message-ID: <57F527FB.4080406@avidsoft.com.hk> Werner Pamler via Lazarus wrote: >> I am having problem using the Type Library generated. >> Don't know how to use it. >> >> I tried to 'learn' from old Delphi 5 source code (the only version of >> Delphi I have) that worked with Excel 2000 but found that the type >> library are so different from the one generated by FPC. >> > I try to avoid that OLE stuff as much as possible - too much pain... > What is the reason why you want to control Excel? Maybe you can > achieve the same in a different way. If it's only reading or writing > files you should have a look a fpspreadsheet which covers - I'd say - > 90% of what is needed (this is not what Excel offers - Excel has > always offered more features than were needed). > I hate to use OLE as well but my customer needs to write his own Excel spreadsheet formula and VBA routines etc and feed the results every 5 minutes into my program and my program will execute some tasks accordingly and write back the statuses to the Excel spreadsheet. I tried to persuade him to learn pascal or a formal programming language but he refused. By the way, I want to complain about OLE Automation. It must run in the main thread. If I run it in an non-main thread even with locking routine (coXXXX ) , it still crashes. I guess some deep down routines in OLE just forget to make as thread safe. > If you insist on Automation you should look at the wiki articles > http://wiki.lazarus.freepascal.org/Office_Automation and > http://wiki.lazarus.freepascal.org/ExcelAutomation/de - the latter is > in German, though. > > I tried fpspreadsheet but it does not support DDE which my customer needs. Also, it does not support writing VBA. Dennis -------------- next part -------------- An HTML attachment was scrubbed... URL: From sysrpl at gmail.com Wed Oct 5 19:12:34 2016 From: sysrpl at gmail.com (Anthony Walter) Date: Wed, 5 Oct 2016 13:12:34 -0400 Subject: [Lazarus] Notice: Due to Hurricane Matthew I'll be unavailable for the next few days Message-ID: Due to Hurricane Matthew I'm being evacuated from my home for a few days. If anyone wants to check up on me or my home I've set up a continuous live video stream from my living room. It can be used to monitor the current situation. My living room video stream: http://www.codebot.org/articles/?doc=9599 -------------- next part -------------- An HTML attachment was scrubbed... URL: From vfclists at gmail.com Wed Oct 5 19:22:02 2016 From: vfclists at gmail.com (vfclists .) Date: Wed, 5 Oct 2016 18:22:02 +0100 Subject: [Lazarus] Notice: Due to Hurricane Matthew I'll be unavailable for the next few days In-Reply-To: References: Message-ID: On 5 October 2016 at 18:12, Anthony Walter via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > Due to Hurricane Matthew I'm being evacuated from my home for a few days. > If anyone wants to check up on me or my home I've set up a continuous live > video stream from my living room. It can be used to monitor the current > situation. > > My living room video stream: > > http://www.codebot.org/articles/?doc=9599 > > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus > > Wow. Cool.. That must be exciting. The weather in the UK can be so boring. The worst you can have is major snowfall which isn't major by North American standards, or some flood, or some heatwave. The camera is nice tough. Let's pray it turns out well. Keep safe and lets hear from you in a few days. -- Frank Church ======================= http://devblog.brahmancreations.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From vfclists at gmail.com Wed Oct 5 19:25:15 2016 From: vfclists at gmail.com (vfclists .) Date: Wed, 5 Oct 2016 18:25:15 +0100 Subject: [Lazarus] Notice: Due to Hurricane Matthew I'll be unavailable for the next few days In-Reply-To: References: Message-ID: On 5 October 2016 at 18:22, vfclists . wrote: > > > On 5 October 2016 at 18:12, Anthony Walter via Lazarus < > lazarus at lists.lazarus-ide.org> wrote: > >> Due to Hurricane Matthew I'm being evacuated from my home for a few days. >> If anyone wants to check up on me or my home I've set up a continuous live >> video stream from my living room. It can be used to monitor the current >> situation. >> >> My living room video stream: >> >> http://www.codebot.org/articles/?doc=9599 >> >> -- >> _______________________________________________ >> Lazarus mailing list >> Lazarus at lists.lazarus-ide.org >> http://lists.lazarus-ide.org/listinfo/lazarus >> >> > Wow. Cool.. That must be exciting. The weather in the UK can be so boring. > The worst you can have is major snowfall which isn't major by North > American standards, or some flood, or some heatwave. > > The camera is nice tough. > > Let's pray it turns out well. Keep safe and lets hear from you in a few > days. > > > -- > Frank Church > > ======================= > http://devblog.brahmancreations.com > I can see it is already in full swing and has broken a window. Good thing you were evacuated. -- Frank Church ======================= http://devblog.brahmancreations.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From capricorn8159 at gmail.com Wed Oct 5 20:52:17 2016 From: capricorn8159 at gmail.com (Shaun) Date: Wed, 5 Oct 2016 19:52:17 +0100 Subject: [Lazarus] Notice: Due to Hurricane Matthew I'll be unavailable for the next few days In-Reply-To: References: Message-ID: <30fd5c8a-aaf9-a6df-8093-c0933fe6dfff@gmail.com> looks like looped video here. On 05/10/2016 18:12, Anthony Walter via Lazarus wrote: > Due to Hurricane Matthew I'm being evacuated from my home for a few > days. If anyone wants to check up on me or my home I've set up a > continuous live video stream from my living room. It can be used to > monitor the current situation. > > My living room video stream: > > http://www.codebot.org/articles/?doc=9599 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From trayres at gmail.com Wed Oct 5 21:02:18 2016 From: trayres at gmail.com (Travis Ayres) Date: Wed, 5 Oct 2016 12:02:18 -0700 Subject: [Lazarus] Notice: Due to Hurricane Matthew I'll be unavailable for the next few days In-Reply-To: <30fd5c8a-aaf9-a6df-8093-c0933fe6dfff@gmail.com> References: <30fd5c8a-aaf9-a6df-8093-c0933fe6dfff@gmail.com> Message-ID: How do you still have power?? On Oct 5, 2016 11:52 AM, "Shaun via Lazarus" wrote: > looks like looped video here. > > On 05/10/2016 18:12, Anthony Walter via Lazarus wrote: > > Due to Hurricane Matthew I'm being evacuated from my home for a few days. > If anyone wants to check up on me or my home I've set up a continuous live > video stream from my living room. It can be used to monitor the current > situation. > > My living room video stream: > > http://www.codebot.org/articles/?doc=9599 > > > > > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wkitty42 at windstream.net Thu Oct 6 01:02:51 2016 From: wkitty42 at windstream.net (wkitty42 at windstream.net) Date: Wed, 5 Oct 2016 19:02:51 -0400 Subject: [Lazarus] Notice: Due to Hurricane Matthew I'll be unavailable for the next few days In-Reply-To: References: Message-ID: <098e1acb-68a9-453e-5ece-e18e6b3ba0b7@windstream.net> On 10/05/2016 01:12 PM, Anthony Walter via Lazarus wrote: > Due to Hurricane Matthew I'm being evacuated from my home for a few days. If > anyone wants to check up on me or my home I've set up a continuous live video > stream from my living room. It can be used to monitor the current situation. > > My living room video stream: > > http://www.codebot.org/articles/?doc=9599 i keep getting a repeated loop... i can tell because the volume is shoved to MAX when it starts and i keep having to turn it down... then it loops and the volume is MAX again :( looks pretty nasty but i don't see any other canaveral and surrounding area cams with that type of ferocious weather going on... -- NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list* unless private contact is specifically requested and granted. From el.es.cr at gmail.com Thu Oct 6 10:07:51 2016 From: el.es.cr at gmail.com (Lukasz Sokol) Date: Thu, 6 Oct 2016 09:07:51 +0100 Subject: [Lazarus] Notice: Due to Hurricane Matthew I'll be unavailable for the next few days In-Reply-To: <098e1acb-68a9-453e-5ece-e18e6b3ba0b7@windstream.net> References: <098e1acb-68a9-453e-5ece-e18e6b3ba0b7@windstream.net> Message-ID: On 06/10/16 00:02, wkitty42--- via Lazarus wrote: > On 10/05/2016 01:12 PM, Anthony Walter via Lazarus wrote: >> Due to Hurricane Matthew I'm being evacuated from my home for a few >> days. If anyone wants to check up on me or my home I've set up a >> continuous live video stream from my living room. It can be used to >> monitor the current situation. >> >> My living room video stream: >> >> http://www.codebot.org/articles/?doc=9599 > > > i keep getting a repeated loop... i can tell because the volume is > shoved to MAX when it starts and i keep having to turn it down... > then it loops and the volume is MAX again :( > > looks pretty nasty but i don't see any other canaveral and > surrounding area cams with that type of ferocious weather going > on... > FUT 'free-pascal.social', pretty bright for ca. 4AM (it's 9AM BST where I'm sitting) ... wow. Would the twitch stream loop eventually if source is gone ? But then, it would not show that it's 'live' ? Will check in a couple o'hours. (Anthony must have good internet cabling/connection and pretty good UPS, possibly) (and his server and internet equipment in a weathertight box too) Somehow, I don't long to have this kind of not-boring weather ;) -L. From l.rame at griensu.com Thu Oct 6 22:52:09 2016 From: l.rame at griensu.com (=?UTF-8?Q?Leonardo_M._Ram=c3=a9?=) Date: Thu, 6 Oct 2016 17:52:09 -0300 Subject: [Lazarus] Fast-small utilities for common javascript tasks, anyone? Message-ID: <89e6ac5e-b4a9-3aae-c9ce-eb23410ab890@griensu.com> Hi, as some of you I mix Lazarus/FPC applications with Javascript/HTML/CSS web sites. As you know, the trend now is using NodeJs for everything, but as I see it too bloated I'm looking for small utilities to do the usual tasks, I mean minifying, linting, uglifying. I'm not neccesarily looking for programs developed using FPC, those can be done in C (like jsmin from Douglas Crockford) or C++, or any other compiled language without dependencies (please, not Java nor .Net). Why I ask this here?, well, first of all, because this is a very friendly community, many of you think as I that software should be as least bloated as possible, also because I asked this before on the javascript irc channel and everyone uses NodeJs there, also I've got many -1s in StackOverflow for asking for specific 3rd party utilities. Regards, -- Leonardo M. Ramé http://leonardorame.blogspot.com From michael at freepascal.org Thu Oct 6 23:01:49 2016 From: michael at freepascal.org (Michael Van Canneyt) Date: Thu, 6 Oct 2016 23:01:49 +0200 (CEST) Subject: [Lazarus] Fast-small utilities for common javascript tasks, anyone? In-Reply-To: <89e6ac5e-b4a9-3aae-c9ce-eb23410ab890@griensu.com> References: <89e6ac5e-b4a9-3aae-c9ce-eb23410ab890@griensu.com> Message-ID: On Thu, 6 Oct 2016, Leonardo M. Ramé via Lazarus wrote: > Hi, as some of you I mix Lazarus/FPC applications with > Javascript/HTML/CSS web sites. As you know, the trend now is using > NodeJs for everything, but as I see it too bloated I'm looking for small > utilities to do the usual tasks, I mean minifying, linting, uglifying. > > I'm not neccesarily looking for programs developed using FPC, those can > be done in C (like jsmin from Douglas Crockford) or C++, or any other > compiled language without dependencies (please, not Java nor .Net). I have translated jsmin to pascal and use that version. I can commit it to fcl-js. > Why I ask this here?, well, first of all, because this is a very > friendly community, many of you think as I that software should be as > least bloated as possible, also because I asked this before on the > javascript irc channel and everyone uses NodeJs there, also I've got > many -1s in StackOverflow for asking for specific 3rd party utilities. I use the lazarus IDE for writing js code. I made a IDE extension that lets you check the JS code using fcl-js. Adding the jsmin tool should be easy. Michael. From aradeonas at operamail.com Fri Oct 7 08:09:19 2016 From: aradeonas at operamail.com (Aradeonas) Date: Thu, 06 Oct 2016 23:09:19 -0700 Subject: [Lazarus] Fast-small utilities for common javascript tasks, anyone? In-Reply-To: References: <89e6ac5e-b4a9-3aae-c9ce-eb23410ab890@griensu.com> Message-ID: <1475820559.2930998.748575489.6727C40E@webmail.messagingengine.com> Hi Michael, As you seem experienced in doing web and js with Lazarus and FPC, can you explain more about routines, tools and flow of the work if you got time in the future? Regards, Ara -- http://www.fastmail.com - Choose from over 50 domains or use your own -------------- next part -------------- An HTML attachment was scrubbed... URL: From vfclists at gmail.com Fri Oct 7 09:53:15 2016 From: vfclists at gmail.com (vfclists .) Date: Fri, 7 Oct 2016 08:53:15 +0100 Subject: [Lazarus] Fast-small utilities for common javascript tasks, anyone? In-Reply-To: <89e6ac5e-b4a9-3aae-c9ce-eb23410ab890@griensu.com> References: <89e6ac5e-b4a9-3aae-c9ce-eb23410ab890@griensu.com> Message-ID: On 6 October 2016 at 21:52, Leonardo M. Ramé via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > Hi, as some of you I mix Lazarus/FPC applications with Javascript/HTML/CSS > web sites. As you know, the trend now is using NodeJs for everything, but > as I see it too bloated I'm looking for small utilities to do the usual > tasks, I mean minifying, linting, uglifying. > > I'm not neccesarily looking for programs developed using FPC, those can be > done in C (like jsmin from Douglas Crockford) or C++, or any other compiled > language without dependencies (please, not Java nor .Net). > > Why I ask this here?, well, first of all, because this is a very friendly > community, many of you think as I that software should be as least bloated > as possible, also because I asked this before on the javascript irc channel > and everyone uses NodeJs there, also I've got many -1s in StackOverflow for > asking for specific 3rd party utilities. > > > > Regards, > -- > Leonardo M. Ramé > http://leonardorame.blogspot.com Stackoverflow nazis do get annoying. Try reddit. They are more friendly and newbie questions gets responses. No one is going to close or mark your question for deletion. -- Frank Church ======================= http://devblog.brahmancreations.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From juha.manninen62 at gmail.com Fri Oct 7 12:33:08 2016 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Fri, 7 Oct 2016 13:33:08 +0300 Subject: [Lazarus] Option to deactivate always open Menu Editor In-Reply-To: <42a3f9c6-c609-ef03-483b-2c7b5990d096@gmx.de> References: <42a3f9c6-c609-ef03-483b-2c7b5990d096@gmx.de> Message-ID: On Sat, Sep 24, 2016 at 12:38 AM, Michael W. Vogel wrote: > In 1.6, I could create some MenuItems, close the Menu Editor. Then, in > Object Inspector, I rename the MenuItems and gave them some Actions. > > In 1.7, always when I select a MenuItem in Object Inspector, the Menu Editor > is opened. Is there a option to deactivate it? I deactivated it in r53074. Please test. Juha From l.rame at griensu.com Fri Oct 7 14:21:43 2016 From: l.rame at griensu.com (=?UTF-8?Q?Leonardo_M._Ram=c3=a9?=) Date: Fri, 7 Oct 2016 09:21:43 -0300 Subject: [Lazarus] Fast-small utilities for common javascript tasks, anyone? In-Reply-To: References: <89e6ac5e-b4a9-3aae-c9ce-eb23410ab890@griensu.com> Message-ID: <9d46f703-bc36-1b4c-d8b9-1b4cc825091b@griensu.com> El 06/10/16 a las 18:01, Michael Van Canneyt escribió: > > > On Thu, 6 Oct 2016, Leonardo M. Ramé via Lazarus wrote: > >> Hi, as some of you I mix Lazarus/FPC applications with >> Javascript/HTML/CSS web sites. As you know, the trend now is using >> NodeJs for everything, but as I see it too bloated I'm looking for >> small utilities to do the usual tasks, I mean minifying, linting, >> uglifying. >> >> I'm not neccesarily looking for programs developed using FPC, those >> can be done in C (like jsmin from Douglas Crockford) or C++, or any >> other compiled language without dependencies (please, not Java nor >> .Net). > > I have translated jsmin to pascal and use that version. I can commit > it to fcl-js. > >> Why I ask this here?, well, first of all, because this is a very >> friendly community, many of you think as I that software should be as >> least bloated as possible, also because I asked this before on the >> javascript irc channel and everyone uses NodeJs there, also I've got >> many -1s in StackOverflow for asking for specific 3rd party utilities. > > I use the lazarus IDE for writing js code. I made a IDE extension that > lets you check the JS code using fcl-js. > Adding the jsmin tool should be easy. > > Michael. Hi Michael, could you post jsmin.pas here?. Regards, -- Leonardo M. Ramé http://leonardorame.blogspot.com From juha.manninen62 at gmail.com Fri Oct 7 15:29:29 2016 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Fri, 7 Oct 2016 16:29:29 +0300 Subject: [Lazarus] Online Package Manager In-Reply-To: References: Message-ID: The online package manager works well and its operation is smooth thanks to threaded code. Earlier discussions have recommended fppkg. http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-An-online-package-manager-tt4043469.html#none I discussed with GetMem earlier and he says fppkg is not very well suited here. I must take his word on this issue because he is the only person so far to make a functional online package manager. "Lazarus packagemanager" from Darius Blaszyk uses fppkg but does not work. The "Aarre" initiative from Mattias and myself has no functional code either. Several people (including myself) had plans to write such a package manager ... but nobody did until now. My goal is to include this GetMem's work in Lazarus sources. It also means commit access for him. Now the code has copies of some FCL classes and a copy of VirtualTreeview. These can be seen as temporary copies. The goal is to integrate management of online package and local packages. The Install/Uninstall Packages window in Lazarus would then show also online packages and this new VirtualTreeview based GUI would show local packages. In essence the new GUI will be an alternative to the old GUI. Competition is good. What do you people say? Juha From michael at freepascal.org Fri Oct 7 15:35:36 2016 From: michael at freepascal.org (Michael Van Canneyt) Date: Fri, 7 Oct 2016 15:35:36 +0200 (CEST) Subject: [Lazarus] Online Package Manager In-Reply-To: References: Message-ID: On Fri, 7 Oct 2016, Juha Manninen via Lazarus wrote: > The online package manager works well and its operation is smooth > thanks to threaded code. > > Earlier discussions have recommended fppkg. > http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-An-online-package-manager-tt4043469.html#none > I discussed with GetMem earlier and he says fppkg is not very well > suited here. I must take his word on this issue because he is the only > person so far to make a functional online package manager. > "Lazarus packagemanager" from Darius Blaszyk uses fppkg but does not work. > The "Aarre" initiative from Mattias and myself has no functional code either. > Several people (including myself) had plans to write such a package > manager ... but nobody did until now. > > My goal is to include this GetMem's work in Lazarus sources. It also > means commit access for him. > > Now the code has copies of some FCL classes and a copy of > VirtualTreeview. These can be seen as temporary copies. > The goal is to integrate management of online package and local > packages. The Install/Uninstall Packages window in Lazarus would then > show also online packages and this new VirtualTreeview based GUI would > show local packages. In essence the new GUI will be an alternative to > the old GUI. Competition is good. > > What do you people say? The info regarding the fppkg manager is not quite correct. There is a testing website for submitting fppkg packages (it's not yet published, though). So why fppkg is not suitable is a bit of a mystery to me. Michael. From m-w-vogel at gmx.de Fri Oct 7 15:42:14 2016 From: m-w-vogel at gmx.de (Michael W. Vogel) Date: Fri, 7 Oct 2016 15:42:14 +0200 Subject: [Lazarus] Option to deactivate always open Menu Editor In-Reply-To: References: <42a3f9c6-c609-ef03-483b-2c7b5990d096@gmx.de> Message-ID: <827301b9-24b5-03fa-9b9e-c18f9b9e97d4@gmx.de> Hi Juha, I checked r53075 (32bit FPC trunk r34637, Windows 7). The behaviour here isn't changed. Always, I select a MenuItem in object inspector, the menu editor is opened. A other curious thing (I don't know if it is wanted), in its Caption stands: "Form1.MainMenu1.MenuItem1 - OnClick: is not assigned". If this isn't a wanted behavoiur, I can check this issue this evening, if you want. Kind regards Michl Am 07.10.2016 um 12:33 schrieb Juha Manninen via Lazarus: > I deactivated it in r53074. Please test. > Juha From juha.manninen62 at gmail.com Fri Oct 7 16:31:52 2016 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Fri, 7 Oct 2016 17:31:52 +0300 Subject: [Lazarus] Option to deactivate always open Menu Editor In-Reply-To: <827301b9-24b5-03fa-9b9e-c18f9b9e97d4@gmx.de> References: <42a3f9c6-c609-ef03-483b-2c7b5990d096@gmx.de> <827301b9-24b5-03fa-9b9e-c18f9b9e97d4@gmx.de> Message-ID: On Fri, Oct 7, 2016 at 4:42 PM, Michael W. Vogel via Lazarus wrote: > I checked r53075 (32bit FPC trunk r34637, Windows 7). The behaviour here > isn't changed. Always, I select a MenuItem in object inspector, the menu > editor is opened. > A other curious thing (I don't know if it is wanted), in its Caption stands: > "Form1.MainMenu1.MenuItem1 - OnClick: is not assigned". Uhhh! I am sure it worked then but not any more. The menu editor is now shown through some unknown route. It does not use neither of these: procedure ShowMenuEditor(aMenu: TMenu); function MenuDesigner: TMenuDesigner; > If this isn't a wanted behavoiur, I can check this issue this evening, if > you want. Yes please if you have time and energy. Juha From michael at freepascal.org Sat Oct 8 10:18:28 2016 From: michael at freepascal.org (Michael Van Canneyt) Date: Sat, 8 Oct 2016 10:18:28 +0200 (CEST) Subject: [Lazarus] Fast-small utilities for common javascript tasks, anyone? In-Reply-To: <9d46f703-bc36-1b4c-d8b9-1b4cc825091b@griensu.com> References: <89e6ac5e-b4a9-3aae-c9ce-eb23410ab890@griensu.com> <9d46f703-bc36-1b4c-d8b9-1b4cc825091b@griensu.com> Message-ID: On Fri, 7 Oct 2016, Leonardo M. Ramé wrote: > > El 06/10/16 a las 18:01, Michael Van Canneyt escribió: >> >> >> On Thu, 6 Oct 2016, Leonardo M. Ramé via Lazarus wrote: >> >>> Hi, as some of you I mix Lazarus/FPC applications with Javascript/HTML/CSS >>> web sites. As you know, the trend now is using NodeJs for everything, but >>> as I see it too bloated I'm looking for small utilities to do the usual >>> tasks, I mean minifying, linting, uglifying. >>> >>> I'm not neccesarily looking for programs developed using FPC, those can be >>> done in C (like jsmin from Douglas Crockford) or C++, or any other >>> compiled language without dependencies (please, not Java nor .Net). >> >> I have translated jsmin to pascal and use that version. I can commit it to >> fcl-js. >> >>> Why I ask this here?, well, first of all, because this is a very friendly >>> community, many of you think as I that software should be as least bloated >>> as possible, also because I asked this before on the javascript irc >>> channel and everyone uses NodeJs there, also I've got many -1s in >>> StackOverflow for asking for specific 3rd party utilities. >> >> I use the lazarus IDE for writing js code. I made a IDE extension that lets >> you check the JS code using fcl-js. >> Adding the jsmin tool should be easy. >> >> Michael. > > Hi Michael, could you post jsmin.pas here?. I added it to FPC SVN. packages/fcl-js, unit jsminifier. I included an example program. Improvements and suggestions welcome. Michael. From getmem1 at gmail.com Sun Oct 9 00:23:54 2016 From: getmem1 at gmail.com (=?UTF-8?B?QmFsw6F6cyBTesOpa2VseQ==?=) Date: Sun, 9 Oct 2016 01:23:54 +0300 Subject: [Lazarus] Online Package Manager In-Reply-To: References: Message-ID: fppkg is perfectly suitable for freepascal packages. Nice clean code. A lazarus package is different(although it has some similarities). Converting between the two package type was too much for me. I quickly gave up. Balázs On Fri, Oct 7, 2016 at 4:35 PM, Michael Van Canneyt via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > > > On Fri, 7 Oct 2016, Juha Manninen via Lazarus wrote: > > The online package manager works well and its operation is smooth >> thanks to threaded code. >> >> Earlier discussions have recommended fppkg. >> http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-An- >> online-package-manager-tt4043469.html#none >> I discussed with GetMem earlier and he says fppkg is not very well >> suited here. I must take his word on this issue because he is the only >> person so far to make a functional online package manager. >> "Lazarus packagemanager" from Darius Blaszyk uses fppkg but does not work. >> The "Aarre" initiative from Mattias and myself has no functional code >> either. >> Several people (including myself) had plans to write such a package >> manager ... but nobody did until now. >> >> My goal is to include this GetMem's work in Lazarus sources. It also >> means commit access for him. >> >> Now the code has copies of some FCL classes and a copy of >> VirtualTreeview. These can be seen as temporary copies. >> The goal is to integrate management of online package and local >> packages. The Install/Uninstall Packages window in Lazarus would then >> show also online packages and this new VirtualTreeview based GUI would >> show local packages. In essence the new GUI will be an alternative to >> the old GUI. Competition is good. >> >> What do you people say? >> > > The info regarding the fppkg manager is not quite correct. There is a > testing website for submitting fppkg packages (it's not yet > published, though). So why fppkg is not suitable is a bit of a mystery to > me. > > Michael. > > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaa5500 at ya.ru Sun Oct 9 03:15:28 2016 From: aaa5500 at ya.ru (Alexey) Date: Sun, 9 Oct 2016 04:15:28 +0300 Subject: [Lazarus] Cannot config 2nd toolbar of Coolbar In-Reply-To: References: Message-ID: I opened today options of Coolbar of ide (using rt-click on toolbar's grip lines), and cannot select 2nd toolbar (1st toolbar is selected always with carrot BG color, cant select 2nd). And cant configure it. It is bug? Ubuntu 14.04 gtk2 Alexey -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: gcdbnohpjepbehai.png Type: image/png Size: 27687 bytes Desc: not available URL: From juha.manninen62 at gmail.com Sun Oct 9 18:50:51 2016 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Sun, 9 Oct 2016 19:50:51 +0300 Subject: [Lazarus] Cannot config 2nd toolbar of Coolbar In-Reply-To: References: Message-ID: On Sun, Oct 9, 2016 at 4:15 AM, Alexey via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > I opened today options of Coolbar of ide (using rt-click on toolbar's grip > lines), > and cannot select 2nd toolbar (1st toolbar is selected always with carrot > BG color, cant select 2nd). > And cant configure it. > You can select it by clicking the empty area at right side of the icons. It is bug? > Yes, the behavior is counter-intuitive. Clicking the icons should also select it. If somebody wants to fix it, a patch is welcome. Juha -------------- next part -------------- An HTML attachment was scrubbed... URL: From m-w-vogel at gmx.de Sun Oct 9 20:57:28 2016 From: m-w-vogel at gmx.de (Michael W. Vogel) Date: Sun, 9 Oct 2016 20:57:28 +0200 Subject: [Lazarus] Option to deactivate always open Menu Editor In-Reply-To: References: <42a3f9c6-c609-ef03-483b-2c7b5990d096@gmx.de> <827301b9-24b5-03fa-9b9e-c18f9b9e97d4@gmx.de> Message-ID: <70502ae8-3b49-b5a0-2e0b-10927e0ca6a6@gmx.de> Hi Juha, I tested the issue a while and I can't see any unwanted side effects, so I added a patch here: http://bugs.freepascal.org/view.php?id=30712 See you Kind regards Michl Am 07.10.2016 um 16:31 schrieb Juha Manninen via Lazarus: > On Fri, Oct 7, 2016 at 4:42 PM, Michael W. Vogel via Lazarus > wrote: >> I checked r53075 (32bit FPC trunk r34637, Windows 7). The behaviour here >> isn't changed. Always, I select a MenuItem in object inspector, the menu >> editor is opened. >> A other curious thing (I don't know if it is wanted), in its Caption stands: >> "Form1.MainMenu1.MenuItem1 - OnClick: is not assigned". > Uhhh! > I am sure it worked then but not any more. > The menu editor is now shown through some unknown route. > It does not use neither of these: > > procedure ShowMenuEditor(aMenu: TMenu); > function MenuDesigner: TMenuDesigner; > > >> If this isn't a wanted behavoiur, I can check this issue this evening, if >> you want. > Yes please if you have time and energy. > > Juha From juha.manninen62 at gmail.com Sun Oct 9 21:43:43 2016 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Sun, 9 Oct 2016 22:43:43 +0300 Subject: [Lazarus] Option to deactivate always open Menu Editor In-Reply-To: <70502ae8-3b49-b5a0-2e0b-10927e0ca6a6@gmx.de> References: <42a3f9c6-c609-ef03-483b-2c7b5990d096@gmx.de> <827301b9-24b5-03fa-9b9e-c18f9b9e97d4@gmx.de> <70502ae8-3b49-b5a0-2e0b-10927e0ca6a6@gmx.de> Message-ID: On Sun, Oct 9, 2016 at 9:57 PM, Michael W. Vogel via Lazarus wrote: > I tested the issue a while and I can't see any unwanted side effects, so I > added a patch here: http://bugs.freepascal.org/view.php?id=30712 Thanks. I will test it soon... I am puzzled, what is the purpose of the now uncommented TMenuItemsPropertyEditor? As its comment says "property editor for TMenuItem properties. Invokes the parent menu's component editor." ... but the whole idea was NOT to invoke it. Juha From juha.manninen62 at gmail.com Sun Oct 9 22:20:15 2016 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Sun, 9 Oct 2016 23:20:15 +0300 Subject: [Lazarus] Option to deactivate always open Menu Editor In-Reply-To: References: <42a3f9c6-c609-ef03-483b-2c7b5990d096@gmx.de> <827301b9-24b5-03fa-9b9e-c18f9b9e97d4@gmx.de> <70502ae8-3b49-b5a0-2e0b-10927e0ca6a6@gmx.de> Message-ID: OK! Your patch made me understand the actual problem The OnDesignerSetSelection handler was only added to GlobalDesignHook when the form was created but it was never removed. That was another bug. The right place to add/remove that handler is when the window is shown/hidden. I fixed it in r53087. Please test. TMenuItemsPropertyEditor is not needed, just as I anticipated. Juha From silvioprog at gmail.com Sun Oct 9 22:32:03 2016 From: silvioprog at gmail.com (silvioprog) Date: Sun, 9 Oct 2016 17:32:03 -0300 Subject: [Lazarus] Cannot config 2nd toolbar of Coolbar In-Reply-To: References: Message-ID: On Sun, Oct 9, 2016 at 1:50 PM, Juha Manninen via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > On Sun, Oct 9, 2016 at 4:15 AM, Alexey via Lazarus < > lazarus at lists.lazarus-ide.org> wrote: > [...] > It is bug? >> > > Yes, the behavior is counter-intuitive. Clicking the icons should also > select it. > If somebody wants to fix it, a patch is welcome. > Done: http://bugs.freepascal.org/view.php?id=30713 . -- Silvio Clécio -------------- next part -------------- An HTML attachment was scrubbed... URL: From m-w-vogel at gmx.de Sun Oct 9 22:36:51 2016 From: m-w-vogel at gmx.de (Michael W. Vogel) Date: Sun, 9 Oct 2016 22:36:51 +0200 Subject: [Lazarus] Option to deactivate always open Menu Editor In-Reply-To: References: <42a3f9c6-c609-ef03-483b-2c7b5990d096@gmx.de> <827301b9-24b5-03fa-9b9e-c18f9b9e97d4@gmx.de> <70502ae8-3b49-b5a0-2e0b-10927e0ca6a6@gmx.de> Message-ID: Am 09.10.2016 um 21:43 schrieb Juha Manninen via Lazarus: > I am puzzled, what is the purpose of the now uncommented > TMenuItemsPropertyEditor? > As its comment says > "property editor for TMenuItem properties. > Invokes the parent menu's component editor." > > ... but the whole idea was NOT to invoke it. I didn't know, if it is needed elsewhere. You deactivated it for the current issue, but it doesn't make any difference. So I activated again. Anyway, if it isn't needed somewhere else, it can be removed. Sorry for the trouble. Am 09.10.2016 um 22:20 schrieb Juha Manninen via Lazarus: > The OnDesignerSetSelection handler was only added to GlobalDesignHook > when the form was created but it was never removed. That was another > bug. Ah OK, I doesn't think of that. I tested r53087 and it works fine here. Thank you very much! Kind regards Michl From bartjunk64 at gmail.com Mon Oct 10 11:12:41 2016 From: bartjunk64 at gmail.com (Bart) Date: Mon, 10 Oct 2016 11:12:41 +0200 Subject: [Lazarus] TPageControl OnChange calling issue In-Reply-To: References: Message-ID: On 10/3/16, Michael W. Vogel via Lazarus wrote: > we want to discuss a bug report > http://bugs.freepascal.org/view.php?id=25554 here, not in Mantis (hope, > I understand Bart right). I have remove the call to DoChange in r53089 and documented the changes in http://wiki.lazarus.freepascal.org/Lazarus_1.8.0_release_notes#TCustomTabControl_setting_TabIndex_or_PageIndex_by_code @Michl: feel free to open a seperate bugreport for the feature request to make this behaviour configurable. (Although I think you do not need it anymore?) Bart From mailinglists at geldenhuys.co.uk Mon Oct 10 11:21:48 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Mon, 10 Oct 2016 10:21:48 +0100 Subject: [Lazarus] Calling DrawFocusRect() outside the Paint() event Message-ID: <741ecfd4-a9c2-7aab-32e6-22b7a5082d38@geldenhuys.co.uk> Hi, Working on a visual report designer for the upcoming fpReport. We use Canvas.DrawFocusRect() to draw a selection rectangle around a reporting element (eg: a memo). We can drag that rectangle around in the report designer (which itself is a custom widget). We call the Canvas.DrawFocusRect() from within the MouseMove event. It seems to work fine under LCL-GTK2, but could this be problematic on other platforms, as painting outside the Paint event can normally have undefined results. Or has LCL somehow resolved the issues of painting outside the Paint event? On a side note: The Paint() event for the report designer can potentially have very lengthy code, so we definitely don't want to repaint everything simply because we are dragging a focus rectangle around on the canvas. So if we must, we can obviously work around this by using various states in the Paint method. 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 nc-gaertnma at netcologne.de Mon Oct 10 11:49:32 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Mon, 10 Oct 2016 11:49:32 +0200 Subject: [Lazarus] Calling DrawFocusRect() outside the Paint() event In-Reply-To: <741ecfd4-a9c2-7aab-32e6-22b7a5082d38@geldenhuys.co.uk> References: <741ecfd4-a9c2-7aab-32e6-22b7a5082d38@geldenhuys.co.uk> Message-ID: <20161010114932.60b1327e@limapholos.matflo.wg> On Mon, 10 Oct 2016 10:21:48 +0100 Graeme Geldenhuys via Lazarus wrote: > Hi, > > Working on a visual report designer for the upcoming fpReport. We use > Canvas.DrawFocusRect() to draw a selection rectangle around a reporting > element (eg: a memo). We can drag that rectangle around in the report > designer (which itself is a custom widget). We call the > Canvas.DrawFocusRect() from within the MouseMove event. It seems to work > fine under LCL-GTK2, but could this be problematic on other platforms, > as painting outside the Paint event can normally have undefined results. Some widgetsets like Carbon can only paint during the Paint event. > Or has LCL somehow resolved the issues of painting outside the Paint event? No. If you want to optimize for mini changes like the focusrect you might want to use a bitmap. > On a side note: > The Paint() event for the report designer can potentially have very > lengthy code, so we definitely don't want to repaint everything simply > because we are dragging a focus rectangle around on the canvas. So if we > must, we can obviously work around this by using various states in the > Paint method. You need to optimize the Paint event anyway. You don't need to draw everything when using InvalidateRect instead of Control.Invalidate. And in Paint use Canvas.GetClipRect or lclintf's GetClipRGN to avoid unnecessary calculations. Mattias From michael at freepascal.org Mon Oct 10 12:05:41 2016 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 10 Oct 2016 12:05:41 +0200 (CEST) Subject: [Lazarus] Calling DrawFocusRect() outside the Paint() event In-Reply-To: <20161010114932.60b1327e@limapholos.matflo.wg> References: <741ecfd4-a9c2-7aab-32e6-22b7a5082d38@geldenhuys.co.uk> <20161010114932.60b1327e@limapholos.matflo.wg> Message-ID: On Mon, 10 Oct 2016, Mattias Gaertner via Lazarus wrote: > On Mon, 10 Oct 2016 10:21:48 +0100 > Graeme Geldenhuys via Lazarus wrote: > >> Hi, >> >> Working on a visual report designer for the upcoming fpReport. We use >> Canvas.DrawFocusRect() to draw a selection rectangle around a reporting >> element (eg: a memo). We can drag that rectangle around in the report >> designer (which itself is a custom widget). We call the >> Canvas.DrawFocusRect() from within the MouseMove event. It seems to work >> fine under LCL-GTK2, but could this be problematic on other platforms, >> as painting outside the Paint event can normally have undefined results. > > Some widgetsets like Carbon can only paint during the Paint event. > > >> Or has LCL somehow resolved the issues of painting outside the Paint event? > > No. > If you want to optimize for mini changes like the focusrect you might > want to use a bitmap. Please explain ? > >> On a side note: >> The Paint() event for the report designer can potentially have very >> lengthy code, so we definitely don't want to repaint everything simply >> because we are dragging a focus rectangle around on the canvas. So if we >> must, we can obviously work around this by using various states in the >> Paint method. > > You need to optimize the Paint event anyway. > You don't need to draw everything when using InvalidateRect instead > of Control.Invalidate. > And in Paint use Canvas.GetClipRect or lclintf's GetClipRGN to avoid > unnecessary calculations. So, if I understand you correctly, when I want to draw a focus rect, I must (roughly): - calculate the focusrect, - Call canvas.invalidaterect() with the focusrect - in the paint event, check ClipRect (which should equal the focusrect) - and redraw anything that intersects with the cliprect ? Correct ? Michael. From mailinglists at geldenhuys.co.uk Mon Oct 10 12:05:54 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Mon, 10 Oct 2016 11:05:54 +0100 Subject: [Lazarus] Calling DrawFocusRect() outside the Paint() event In-Reply-To: <20161010114932.60b1327e@limapholos.matflo.wg> References: <741ecfd4-a9c2-7aab-32e6-22b7a5082d38@geldenhuys.co.uk> <20161010114932.60b1327e@limapholos.matflo.wg> Message-ID: <8f93ac3f-de9f-4d45-cf30-25ea8cba8440@geldenhuys.co.uk> On 2016-10-10 10:49, Mattias Gaertner via Lazarus wrote: > Some widgetsets like Carbon can only paint during the Paint event. Thanks for confirming my suspicions and useful advice. 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 nc-gaertnma at netcologne.de Mon Oct 10 12:11:37 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Mon, 10 Oct 2016 12:11:37 +0200 Subject: [Lazarus] Calling DrawFocusRect() outside the Paint() event In-Reply-To: References: <741ecfd4-a9c2-7aab-32e6-22b7a5082d38@geldenhuys.co.uk> <20161010114932.60b1327e@limapholos.matflo.wg> Message-ID: <20161010121137.19e18c6b@limapholos.matflo.wg> On Mon, 10 Oct 2016 12:05:41 +0200 (CEST) Michael Van Canneyt via Lazarus wrote: >[...] > > If you want to optimize for mini changes like the focusrect you might > > want to use a bitmap. > > Please explain ? Draw to a bitmap and in OnPaint draw that. Similar to a TImage. Then you can also use aggpas. >[...] > So, if I understand you correctly, when I want to draw a focus rect, I must > (roughly): > - calculate the focusrect, > - Call canvas.invalidaterect() with the focusrect > - in the paint event, check ClipRect (which should equal the focusrect) > - and redraw anything that intersects with the cliprect ? > > Correct ? Correct. Mattias From michael at freepascal.org Mon Oct 10 12:50:26 2016 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 10 Oct 2016 12:50:26 +0200 (CEST) Subject: [Lazarus] Calling DrawFocusRect() outside the Paint() event In-Reply-To: <20161010121137.19e18c6b@limapholos.matflo.wg> References: <741ecfd4-a9c2-7aab-32e6-22b7a5082d38@geldenhuys.co.uk> <20161010114932.60b1327e@limapholos.matflo.wg> <20161010121137.19e18c6b@limapholos.matflo.wg> Message-ID: On Mon, 10 Oct 2016, Mattias Gaertner via Lazarus wrote: > On Mon, 10 Oct 2016 12:05:41 +0200 (CEST) > Michael Van Canneyt via Lazarus wrote: > >> [...] >> > If you want to optimize for mini changes like the focusrect you might >> > want to use a bitmap. >> >> Please explain ? > > Draw to a bitmap and in OnPaint draw that. Similar to a TImage. > Then you can also use aggpas. I thought lazarus did double buffering by default, so this should be so automatically ? Michael. From michael at freepascal.org Mon Oct 10 12:50:26 2016 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 10 Oct 2016 12:50:26 +0200 (CEST) Subject: [Lazarus] Calling DrawFocusRect() outside the Paint() event In-Reply-To: <20161010121137.19e18c6b@limapholos.matflo.wg> References: <741ecfd4-a9c2-7aab-32e6-22b7a5082d38@geldenhuys.co.uk> <20161010114932.60b1327e@limapholos.matflo.wg> <20161010121137.19e18c6b@limapholos.matflo.wg> Message-ID: On Mon, 10 Oct 2016, Mattias Gaertner via Lazarus wrote: > On Mon, 10 Oct 2016 12:05:41 +0200 (CEST) > Michael Van Canneyt via Lazarus wrote: > >> [...] >> > If you want to optimize for mini changes like the focusrect you might >> > want to use a bitmap. >> >> Please explain ? > > Draw to a bitmap and in OnPaint draw that. Similar to a TImage. > Then you can also use aggpas. I thought lazarus did double buffering by default, so this should be so automatically ? Michael. From mailinglists at geldenhuys.co.uk Mon Oct 10 12:55:14 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Mon, 10 Oct 2016 11:55:14 +0100 Subject: [Lazarus] Calling DrawFocusRect() outside the Paint() event In-Reply-To: <20161010121137.19e18c6b@limapholos.matflo.wg> References: <741ecfd4-a9c2-7aab-32e6-22b7a5082d38@geldenhuys.co.uk> <20161010114932.60b1327e@limapholos.matflo.wg> <20161010121137.19e18c6b@limapholos.matflo.wg> Message-ID: On 2016-10-10 11:11, Mattias Gaertner via Lazarus wrote: > Draw to a bitmap and in OnPaint draw that. Similar to a TImage. > Then you can also use aggpas. Incidently, that is how fpGUI's latest 'develop' branch overcomes the painting outside the Paint method problems. Seeing as AggPas is used as the internal buffer, it doesn't matter when painting calls happen. The actual Paint() method simply bitblt's the AggPas buffer to the real window canvas. 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 Mon Oct 10 12:56:32 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Mon, 10 Oct 2016 11:56:32 +0100 Subject: [Lazarus] Calling DrawFocusRect() outside the Paint() event In-Reply-To: References: <741ecfd4-a9c2-7aab-32e6-22b7a5082d38@geldenhuys.co.uk> <20161010114932.60b1327e@limapholos.matflo.wg> <20161010121137.19e18c6b@limapholos.matflo.wg> Message-ID: <44df6e0e-6752-c14a-1d56-0a8b220d541f@geldenhuys.co.uk> On 2016-10-10 11:50, Michael Van Canneyt via Lazarus wrote: > I thought lazarus did double buffering by default, so this should be so automatically ? I don't believe LCL uses double buffering by default (for some reason or another). At least that is what I was told in the Lazarus Forums. 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 zeljko at holobit.net Mon Oct 10 13:11:03 2016 From: zeljko at holobit.net (zeljko) Date: Mon, 10 Oct 2016 13:11:03 +0200 Subject: [Lazarus] Calling DrawFocusRect() outside the Paint() event In-Reply-To: <741ecfd4-a9c2-7aab-32e6-22b7a5082d38@geldenhuys.co.uk> References: <741ecfd4-a9c2-7aab-32e6-22b7a5082d38@geldenhuys.co.uk> Message-ID: <2978d86d-e044-9c90-7974-ba0b1a6eee84@holobit.net> On 10/10/2016 11:21 AM, Graeme Geldenhuys via Lazarus wrote: > Hi, > > Working on a visual report designer for the upcoming fpReport. We use > Canvas.DrawFocusRect() to draw a selection rectangle around a reporting > element (eg: a memo). We can drag that rectangle around in the report > designer (which itself is a custom widget). We call the > Canvas.DrawFocusRect() from within the MouseMove event. It seems to work > fine under LCL-GTK2, but could this be problematic on other platforms, > as painting outside the Paint event can normally have undefined results. > > Or has LCL somehow resolved the issues of painting outside the Paint event? No, carbon, cocoa and qt widgetset (qt on all platforms) cannot paint outside of paint event. FocusRect(s) can be saved in an object or array of focus TRectangles, Update() or Update(RectToBeUpdated) can be called from MouseMove, and then in paint method paint saved FocusRect(s). zeljko From zeljko at holobit.net Mon Oct 10 13:11:03 2016 From: zeljko at holobit.net (zeljko) Date: Mon, 10 Oct 2016 13:11:03 +0200 Subject: [Lazarus] Calling DrawFocusRect() outside the Paint() event In-Reply-To: <741ecfd4-a9c2-7aab-32e6-22b7a5082d38@geldenhuys.co.uk> References: <741ecfd4-a9c2-7aab-32e6-22b7a5082d38@geldenhuys.co.uk> Message-ID: <2978d86d-e044-9c90-7974-ba0b1a6eee84@holobit.net> On 10/10/2016 11:21 AM, Graeme Geldenhuys via Lazarus wrote: > Hi, > > Working on a visual report designer for the upcoming fpReport. We use > Canvas.DrawFocusRect() to draw a selection rectangle around a reporting > element (eg: a memo). We can drag that rectangle around in the report > designer (which itself is a custom widget). We call the > Canvas.DrawFocusRect() from within the MouseMove event. It seems to work > fine under LCL-GTK2, but could this be problematic on other platforms, > as painting outside the Paint event can normally have undefined results. > > Or has LCL somehow resolved the issues of painting outside the Paint event? No, carbon, cocoa and qt widgetset (qt on all platforms) cannot paint outside of paint event. FocusRect(s) can be saved in an object or array of focus TRectangles, Update() or Update(RectToBeUpdated) can be called from MouseMove, and then in paint method paint saved FocusRect(s). zeljko From nc-gaertnma at netcologne.de Mon Oct 10 13:21:41 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Mon, 10 Oct 2016 13:21:41 +0200 Subject: [Lazarus] Calling DrawFocusRect() outside the Paint() event In-Reply-To: References: <741ecfd4-a9c2-7aab-32e6-22b7a5082d38@geldenhuys.co.uk> <20161010114932.60b1327e@limapholos.matflo.wg> <20161010121137.19e18c6b@limapholos.matflo.wg> Message-ID: <20161010132141.705f52ce@limapholos.matflo.wg> On Mon, 10 Oct 2016 12:50:26 +0200 (CEST) Michael Van Canneyt wrote: > On Mon, 10 Oct 2016, Mattias Gaertner via Lazarus wrote: > > > On Mon, 10 Oct 2016 12:05:41 +0200 (CEST) > > Michael Van Canneyt via Lazarus wrote: > > > >> [...] > >> > If you want to optimize for mini changes like the focusrect you might > >> > want to use a bitmap. > >> > >> Please explain ? > > > > Draw to a bitmap and in OnPaint draw that. Similar to a TImage. > > Then you can also use aggpas. > > I thought lazarus did double buffering by default, so this should be so automatically ? Double buffering means, that there are two buffers, one for showing and for painting. When painting is done they are "swapped". This avoids flickering. No more, no less. What happens with the second buffer between two paint events is up to the widgetset. The buffer often does not contain your last painted bitmap. Mattias From nc-gaertnma at netcologne.de Mon Oct 10 13:31:45 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Mon, 10 Oct 2016 13:31:45 +0200 Subject: [Lazarus] Calling DrawFocusRect() outside the Paint() event In-Reply-To: <44df6e0e-6752-c14a-1d56-0a8b220d541f@geldenhuys.co.uk> References: <741ecfd4-a9c2-7aab-32e6-22b7a5082d38@geldenhuys.co.uk> <20161010114932.60b1327e@limapholos.matflo.wg> <20161010121137.19e18c6b@limapholos.matflo.wg> <44df6e0e-6752-c14a-1d56-0a8b220d541f@geldenhuys.co.uk> Message-ID: <20161010133145.36a898ba@limapholos.matflo.wg> On Mon, 10 Oct 2016 11:56:32 +0100 Graeme Geldenhuys via Lazarus wrote: > On 2016-10-10 11:50, Michael Van Canneyt via Lazarus wrote: > > I thought lazarus did double buffering by default, so this should be so automatically ? > > I don't believe LCL uses double buffering by default (for some reason or > another). At least that is what I was told in the Lazarus Forums. Widgetsets forbidding to paint outside OnPaint always use double buffering. Widgetsets that allow drawing outside give a choice. For historical reasons TWinControl.DoubleBuffered defaults to false. Mattias From michael at freepascal.org Mon Oct 10 14:05:56 2016 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 10 Oct 2016 14:05:56 +0200 (CEST) Subject: [Lazarus] Calling DrawFocusRect() outside the Paint() event In-Reply-To: <20161010132141.705f52ce@limapholos.matflo.wg> References: <741ecfd4-a9c2-7aab-32e6-22b7a5082d38@geldenhuys.co.uk> <20161010114932.60b1327e@limapholos.matflo.wg> <20161010121137.19e18c6b@limapholos.matflo.wg> <20161010132141.705f52ce@limapholos.matflo.wg> Message-ID: On Mon, 10 Oct 2016, Mattias Gaertner via Lazarus wrote: > On Mon, 10 Oct 2016 12:50:26 +0200 (CEST) > Michael Van Canneyt wrote: > >> On Mon, 10 Oct 2016, Mattias Gaertner via Lazarus wrote: >> >> > On Mon, 10 Oct 2016 12:05:41 +0200 (CEST) >> > Michael Van Canneyt via Lazarus wrote: >> > >> >> [...] >> >> > If you want to optimize for mini changes like the focusrect you might >> >> > want to use a bitmap. >> >> >> >> Please explain ? >> > >> > Draw to a bitmap and in OnPaint draw that. Similar to a TImage. >> > Then you can also use aggpas. >> >> I thought lazarus did double buffering by default, so this should be so automatically ? > > Double buffering means, that there are two buffers, one for showing and > for painting. When painting is done they are "swapped". > This avoids flickering. No more, no less. I understand that. But the effect is that inside the Paint() event you are actually drawing to a bitmap (buffer), which is then swapped to the display once the paint method is done ? So why would I want to introduce a third buffer, which is then copied to the second, which is then copied to the actual display ? I thought the idea was to be more efficient, not less ? Michael. From michael at freepascal.org Mon Oct 10 14:05:56 2016 From: michael at freepascal.org (Michael Van Canneyt) Date: Mon, 10 Oct 2016 14:05:56 +0200 (CEST) Subject: [Lazarus] Calling DrawFocusRect() outside the Paint() event In-Reply-To: <20161010132141.705f52ce@limapholos.matflo.wg> References: <741ecfd4-a9c2-7aab-32e6-22b7a5082d38@geldenhuys.co.uk> <20161010114932.60b1327e@limapholos.matflo.wg> <20161010121137.19e18c6b@limapholos.matflo.wg> <20161010132141.705f52ce@limapholos.matflo.wg> Message-ID: On Mon, 10 Oct 2016, Mattias Gaertner via Lazarus wrote: > On Mon, 10 Oct 2016 12:50:26 +0200 (CEST) > Michael Van Canneyt wrote: > >> On Mon, 10 Oct 2016, Mattias Gaertner via Lazarus wrote: >> >> > On Mon, 10 Oct 2016 12:05:41 +0200 (CEST) >> > Michael Van Canneyt via Lazarus wrote: >> > >> >> [...] >> >> > If you want to optimize for mini changes like the focusrect you might >> >> > want to use a bitmap. >> >> >> >> Please explain ? >> > >> > Draw to a bitmap and in OnPaint draw that. Similar to a TImage. >> > Then you can also use aggpas. >> >> I thought lazarus did double buffering by default, so this should be so automatically ? > > Double buffering means, that there are two buffers, one for showing and > for painting. When painting is done they are "swapped". > This avoids flickering. No more, no less. I understand that. But the effect is that inside the Paint() event you are actually drawing to a bitmap (buffer), which is then swapped to the display once the paint method is done ? So why would I want to introduce a third buffer, which is then copied to the second, which is then copied to the actual display ? I thought the idea was to be more efficient, not less ? Michael. From nc-gaertnma at netcologne.de Mon Oct 10 14:53:18 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Mon, 10 Oct 2016 14:53:18 +0200 Subject: [Lazarus] Calling DrawFocusRect() outside the Paint() event In-Reply-To: References: <741ecfd4-a9c2-7aab-32e6-22b7a5082d38@geldenhuys.co.uk> <20161010114932.60b1327e@limapholos.matflo.wg> <20161010121137.19e18c6b@limapholos.matflo.wg> <20161010132141.705f52ce@limapholos.matflo.wg> Message-ID: <20161010145318.70273304@limapholos.matflo.wg> On Mon, 10 Oct 2016 14:05:56 +0200 (CEST) Michael Van Canneyt wrote: >[...] > But the effect is that inside the Paint() event you are actually drawing to a bitmap (buffer), > which is then swapped to the display once the paint method is done ? The effect is that you can do small draws inside and outside the paint event and only need a draw bitmap in OnPaint. Which depending on your control might be faster than drawing everything on every OnPaint. If you instead can optimize your OnPaint event you don't need this bitmap. And if you target only Windows+Gtk, you can draw outside OnPaint and don't need the bitmap either. > So why would I want to introduce a third buffer, which is then copied to the second, which is then copied to the actual display ? Copying compatible bitmaps is pretty fast. Mattias From juha.manninen62 at gmail.com Mon Oct 10 23:08:15 2016 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Tue, 11 Oct 2016 00:08:15 +0300 Subject: [Lazarus] GTK2 version and backspace key in Edit fields Message-ID: Regarding issue: http://bugs.freepascal.org/view.php?id=30596 GTK2 users please test if there is any version that needs special treatment. If not, then I will remove the GTK2 version checks. See the last 2 notes in the bug report for details please. Juha From bartjunk64 at gmail.com Mon Oct 10 23:41:21 2016 From: bartjunk64 at gmail.com (Bart) Date: Mon, 10 Oct 2016 23:41:21 +0200 Subject: [Lazarus] GTK2 version and backspace key in Edit fields In-Reply-To: References: Message-ID: On 10/10/16, Juha Manninen via Lazarus wrote: > GTK2 users please test if there is any version that needs special treatment. > If not, then I will remove the GTK2 version checks. > See the last 2 notes in the bug report for details please. Please read my comments in that bugreport first. Bart From aaa5500 at ya.ru Tue Oct 11 03:24:36 2016 From: aaa5500 at ya.ru (Alexey) Date: Tue, 11 Oct 2016 04:24:36 +0300 Subject: [Lazarus] GTK2 version and backspace key in Edit fields In-Reply-To: References: Message-ID: <42ebc3c4-c84c-7c93-18fc-ef40117425d1@ya.ru> On 11.10.2016 00:08, Juha Manninen via Lazarus wrote: > See the last 2 notes in the bug report Juha, even Ubuntu 14.4 has gtk 2.24, so cannot test (code needs 2.17- ). I think u can delete it -- Regards, Alex From aaa5500 at ya.ru Tue Oct 11 03:29:41 2016 From: aaa5500 at ya.ru (Alexey) Date: Tue, 11 Oct 2016 04:29:41 +0300 Subject: [Lazarus] Calling DrawFocusRect() outside the Paint() event In-Reply-To: <20161010145318.70273304@limapholos.matflo.wg> References: <741ecfd4-a9c2-7aab-32e6-22b7a5082d38@geldenhuys.co.uk> <20161010114932.60b1327e@limapholos.matflo.wg> <20161010121137.19e18c6b@limapholos.matflo.wg> <20161010132141.705f52ce@limapholos.matflo.wg> <20161010145318.70273304@limapholos.matflo.wg> Message-ID: My opinion about sbj. You may do check, or not do check, but pls, remove that Debug line which prints error. I want it for Cudatext, which prints lot of crap with it. I cant yet rework ATSynEdit code (to "fix it") Alexey From aaa5500 at ya.ru Tue Oct 11 03:31:58 2016 From: aaa5500 at ya.ru (Alexey) Date: Tue, 11 Oct 2016 04:31:58 +0300 Subject: [Lazarus] Wish, remove this GTK2 debug line In-Reply-To: References: <741ecfd4-a9c2-7aab-32e6-22b7a5082d38@geldenhuys.co.uk> <20161010114932.60b1327e@limapholos.matflo.wg> <20161010121137.19e18c6b@limapholos.matflo.wg> <20161010132141.705f52ce@limapholos.matflo.wg> <20161010145318.70273304@limapholos.matflo.wg> Message-ID: On 11.10.2016 04:29, Alexey via Lazarus wrote: > remove that Debug line which prints error. I misread the subject: I mean that debug line- user at user-Notebook:~$ cudatext WARNING: TGtk2WidgetSet.InvalidateRect refused invalidating during paint message: TATSynEdit WARNING: TGtk2WidgetSet.InvalidateRect refused invalidating during paint message: TATSynEdit WARNING: TGtk2WidgetSet.InvalidateRect refused invalidating during paint message: TATSynEdit WARNING: TGtk2WidgetSet.InvalidateRect refused invalidating during paint message: TATSynEdit WARNING: TGtk2WidgetSet.InvalidateRect refused invalidating during paint message: TATSynEdit WARNING: TGtk2WidgetSet.InvalidateRect refused invalidating during paint message: TATSynEdit -- Regards, Alex From tc at epidata.info Tue Oct 11 09:00:12 2016 From: tc at epidata.info (Torsten Bonde Christiansen) Date: Tue, 11 Oct 2016 09:00:12 +0200 Subject: [Lazarus] GTK2 version and backspace key in Edit fields In-Reply-To: References: Message-ID: <7ca9bde3-8d15-da2e-ad82-d765e8a99555@epidata.info> I have no idea about the versioning with the glib2/gtk2 lib, but I can confirm that the patch works here: Free Pascal Compiler version 3.0.0 Compiler date : 2015/11/26 Compiler CPU target: x86_64 Lazarus trunk: r53093 glib2: 2.48.2 gtk2: 2.24.31 Torsten. On 2016-10-10 23:08, Juha Manninen via Lazarus wrote: > Regarding issue: > http://bugs.freepascal.org/view.php?id=30596 > > GTK2 users please test if there is any version that needs special treatment. > If not, then I will remove the GTK2 version checks. > See the last 2 notes in the bug report for details please. > > Juha From david.copeland at jsidata.ca Tue Oct 11 14:39:50 2016 From: david.copeland at jsidata.ca (David Copeland) Date: Tue, 11 Oct 2016 08:39:50 -0400 Subject: [Lazarus] GTK2 version and backspace key in Edit fields In-Reply-To: <7ca9bde3-8d15-da2e-ad82-d765e8a99555@epidata.info> References: <7ca9bde3-8d15-da2e-ad82-d765e8a99555@epidata.info> Message-ID: The bug is still present here. FPC 3.0, Lazarus r53093. OpenSuse 42.1 glib2 2.44.1 gtk2 2.24.31 Dave Copeland. > > On 2016-10-10 23:08, Juha Manninen via Lazarus wrote: >> Regarding issue: >> http://bugs.freepascal.org/view.php?id=30596 >> >> GTK2 users please test if there is any version that needs special >> treatment. >> If not, then I will remove the GTK2 version checks. >> See the last 2 notes in the bug report for details please. >> >> Juha > > -- David Copeland JSI Data Systems Limited 613-727-9353 www.jsidata.ca From david.copeland at jsidata.ca Tue Oct 11 14:46:04 2016 From: david.copeland at jsidata.ca (David Copeland) Date: Tue, 11 Oct 2016 08:46:04 -0400 Subject: [Lazarus] GTK2 version and backspace key in Edit fields In-Reply-To: References: <7ca9bde3-8d15-da2e-ad82-d765e8a99555@epidata.info> Message-ID: Cancel that, not sure yet, didn't apply the patch yet. On 11/10/16 08:39 AM, David Copeland via Lazarus wrote: > The bug is still present here. > > FPC 3.0, Lazarus r53093. > OpenSuse 42.1 > glib2 2.44.1 > gtk2 2.24.31 > > Dave Copeland. > > -- David Copeland JSI Data Systems Limited 613-727-9353 www.jsidata.ca From tony.whyman at mccallumwhyman.com Tue Oct 11 14:46:06 2016 From: tony.whyman at mccallumwhyman.com (Tony Whyman) Date: Tue, 11 Oct 2016 13:46:06 +0100 Subject: [Lazarus] TDBEdit, TStringField Size, DataSize, DisplayWidth and MaxLength Message-ID: <035d4254-63a5-95f2-05a3-4fdd2136c9c0@mccallumwhyman.com> An IBX user came to me with a problem and the problem seems to be a deep seated disconnect between multi-byte character sets, TStringField.Size and TDBEdit.MaxLength. Something needs to give - but I am not sure what should. Firstly documentation: If you go back to Delphi, TField.DataSize is the memory needed to hold the Field's value. The DisplayWidth is the number of characters to be displayed, and Size is, for datatype ftstring, "the maximum number of characters in the string". How literally this last definition should be taken, I'm not sure, as it may well have been written assuming a single byte character set. On the other hand, the FPC documentation is consistent with Delphi for DisplayWidth and DataSize, but more opaque for TField.Size where it is the "logical size" - whatever that means, although TStringField is more definitive by saying it is the maximum size (in characters) - their brackets not mine. That seems to be consistent with TDBEdit.Maxlength which should be the maximum number of characters that can appear in the control and, if you look at the code, TDBEdit will source the default value from FDatalink.Size (And also seems to ignore DisplayWidth). The problem comes when you look at the code for TStringField.GetValue, where it starts off as: function TStringField.GetValue(var AValue: string): Boolean; var Buf, TBuf : TStringFieldBuffer; DynBuf, TDynBuf : Array of char; begin if DataSize <= dsMaxStringSize then begin Result:=GetData(@Buf); Buf[Size]:=#0; //limit string to Size If Result then begin ... If nothing else, this is a "bug in waiting". TStringField.GetDataSize always returns "Size+1", so "Buff[Size]:=#0; should work - but only as long as the virtual method "GetDataSize" is not overridden (GetValue is non-virtual) and Size is the byte length of the string! There is a built-in assumption here that "Size" is the byte length of the string and not the character length. If you have a multi-byte character set and set size to the number of characters and DataSize to e.g. for UTF8 4*(no of characters)+1, then you will get string corruption as a result of the above. IBX handles multi-byte character sets and does so by defining TIBStringField as a subclass of TStringFIeld and setting size to the byte length and the Default DisplayWidth to the character width. This is compatible with TStringField as it works today. It also seems to be compatible with TDBGrid, which uses Field.DisplayWidth. However, it does result in TDBEdit accepting too many characters. What should be done? It's a problem. Ideally, the TStringField code should be aligned with the documentation. However, that could break existing code and would need to handled carefully. TStringFIeld also needs fixing i.e. to Buf[DataSize-1]:=#0 in order to make this a reality. Alternatively, the documentation could be amended to reflect the implementation. This means that TDBEdit (and maybe more) have to be updated - but why doesn't TDBEdit respect the DisplayWidth property anyway? Perhaps, it is also about time that TStringField got a characterWidth property to hold the maximum number of bytes for each character. That would at least allow the DataSize to be automatically computed from the character width. If I had to write a bug report today, I would write it to avoid changes to IBX - but then is that the right answer? Tony Whyman MWA From david.copeland at jsidata.ca Tue Oct 11 14:57:11 2016 From: david.copeland at jsidata.ca (David Copeland) Date: Tue, 11 Oct 2016 08:57:11 -0400 Subject: [Lazarus] GTK2 version and backspace key in Edit fields In-Reply-To: References: <7ca9bde3-8d15-da2e-ad82-d765e8a99555@epidata.info> Message-ID: Okay, applied the patch and the bug appears to be fixed. Sorry for the extra noise. On 11/10/16 08:46 AM, David Copeland via Lazarus wrote: > Cancel that, not sure yet, didn't apply the patch yet. > > On 11/10/16 08:39 AM, David Copeland via Lazarus wrote: >> The bug is still present here. >> >> FPC 3.0, Lazarus r53093. >> OpenSuse 42.1 >> glib2 2.44.1 >> gtk2 2.24.31 >> >> Dave Copeland. >> >> > -- David Copeland JSI Data Systems Limited 613-727-9353 www.jsidata.ca From lacak at zoznam.sk Tue Oct 11 15:32:03 2016 From: lacak at zoznam.sk (LacaK) Date: Tue, 11 Oct 2016 15:32:03 +0200 Subject: [Lazarus] TDBEdit, TStringField Size, DataSize, DisplayWidth and MaxLength In-Reply-To: <035d4254-63a5-95f2-05a3-4fdd2136c9c0@mccallumwhyman.com> References: <035d4254-63a5-95f2-05a3-4fdd2136c9c0@mccallumwhyman.com> Message-ID: <5346d810-7d86-454d-f514-90b62610499a@zoznam.sk> > An IBX user came to me with a problem and the problem seems to be a > deep seated disconnect between multi-byte character sets, > TStringField.Size and TDBEdit.MaxLength. Something needs to give - but > I am not sure what should. > > Firstly documentation: > > If you go back to Delphi, TField.DataSize is the memory needed to hold > the Field's value. The DisplayWidth is the number of characters to be > displayed, and Size is, for datatype ftstring, "the maximum number of > characters in the string". Right. TStringField.Size is size of characters, not bytes > How literally this last definition should be taken, I'm not sure, as > it may well have been written assuming a single byte character set. > > On the other hand, the FPC documentation is consistent with Delphi for > DisplayWidth and DataSize, but more opaque for TField.Size where it is > the "logical size" - whatever that means, although TStringField is > more definitive by saying it is the maximum size (in characters) - > their brackets not mine. > > That seems to be consistent with TDBEdit.Maxlength which should be the > maximum number of characters that can appear in the control and, if > you look at the code, TDBEdit will source the default value from > FDatalink.Size (And also seems to ignore DisplayWidth). TDBEdit.MaxLength must correspond to TStringField.Size > > The problem comes when you look at the code for TStringField.GetValue, > where it starts off as: > > function TStringField.GetValue(var AValue: string): Boolean; > > var Buf, TBuf : TStringFieldBuffer; > DynBuf, TDynBuf : Array of char; > > begin > if DataSize <= dsMaxStringSize then > begin > Result:=GetData(@Buf); > Buf[Size]:=#0; //limit string to Size > If Result then > begin > ... Look at TRUNK, there is already changed code, which takes DataSize ;-) > > If nothing else, this is a "bug in waiting". TStringField.GetDataSize > always returns "Size+1", so "Buff[Size]:=#0; should work - but only as > long as the virtual method "GetDataSize" is not overridden (GetValue > is non-virtual) and Size is the byte length of the string! in TRUNK is GetDataSize changed also, it takes into account Fields CharSet and for UTF8 returns 4*Size+1 > > There is a built-in assumption here that "Size" is the byte length of > the string and not the character length. this assumption came from old Delphi days, where it was so for SBCS > If you have a multi-byte character set and set size to the number of > characters and DataSize to e.g. for UTF8 4*(no of characters)+1, then > you will get string corruption as a result of the above. > > IBX handles multi-byte character sets and does so by defining > TIBStringField as a subclass of TStringFIeld and setting size to the > byte length and the Default DisplayWidth to the character width. This > is compatible with TStringField as it works today. It also seems to be > compatible with TDBGrid, which uses Field.DisplayWidth. However, it > does result in TDBEdit accepting too many characters. > > What should be done? > > It's a problem. Ideally, the TStringField code should be aligned with > the documentation. However, that could break existing code and would > need to handled carefully. TStringFIeld also needs fixing i.e. to > Buf[DataSize-1]:=#0 in order to make this a reality. Size must be character size (used for visual components if they handle characters) DataSize must be byte size (used for record buffers to store character data) > > Alternatively, the documentation could be amended to reflect the > implementation. This means that TDBEdit (and maybe more) have to be > updated - but why doesn't TDBEdit respect the DisplayWidth property > anyway? > > Perhaps, it is also about time that TStringField got a characterWidth > property to hold the maximum number of bytes for each character. That > would at least allow the DataSize to be automatically computed from > the character width. There is new TFieldDef.CharSize which says how many bytes is one character > > If I had to write a bug report today, I would write it to avoid > changes to IBX - but then is that the right answer? Please look at changes in TRUNK. May be that not all is perfect, but you will see there direction ... -Laco. From tony.whyman at mccallumwhyman.com Tue Oct 11 15:48:15 2016 From: tony.whyman at mccallumwhyman.com (Tony Whyman) Date: Tue, 11 Oct 2016 14:48:15 +0100 Subject: [Lazarus] TDBEdit, TStringField Size, DataSize, DisplayWidth and MaxLength In-Reply-To: <5346d810-7d86-454d-f514-90b62610499a@zoznam.sk> References: <035d4254-63a5-95f2-05a3-4fdd2136c9c0@mccallumwhyman.com> <5346d810-7d86-454d-f514-90b62610499a@zoznam.sk> Message-ID: <401a8d0d-47a2-92d8-d38c-b06e372aefbf@mccallumwhyman.com> Please look at changes in TRUNK. > May be that not all is perfect, but you will see there direction ... > > -Laco. > Which FPC version is this likely to be released in? On a quick review of the code, all seems good. Just one point: GetDataSize seems to acknowledge CP_UTF8 as the only multibyte character set. The Firebird character set GB18030 (Chinese characters) is multi-byte (see wikipedia) and has code page 54936. I believe PostgreSQL also supports it. From nc-gaertnma at netcologne.de Tue Oct 11 15:59:35 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Tue, 11 Oct 2016 15:59:35 +0200 Subject: [Lazarus] Wish, remove this GTK2 debug line In-Reply-To: References: <741ecfd4-a9c2-7aab-32e6-22b7a5082d38@geldenhuys.co.uk> <20161010114932.60b1327e@limapholos.matflo.wg> <20161010121137.19e18c6b@limapholos.matflo.wg> <20161010132141.705f52ce@limapholos.matflo.wg> <20161010145318.70273304@limapholos.matflo.wg> Message-ID: <20161011155935.36e75a5a@limapholos.matflo.wg> On Tue, 11 Oct 2016 04:31:58 +0300 Alexey via Lazarus wrote: > On 11.10.2016 04:29, Alexey via Lazarus wrote: > > remove that Debug line which prints error. > > I misread the subject: I mean that debug line- > > user at user-Notebook:~$ cudatext > WARNING: TGtk2WidgetSet.InvalidateRect refused invalidating during paint > message: TATSynEdit That's not a debug line. It's a warning, that the GTK interface had to break an endless loop. Please create bug report with an example to reproduce this. Mattias From mse00000 at gmail.com Tue Oct 11 16:14:46 2016 From: mse00000 at gmail.com (Martin Schreiber) Date: Tue, 11 Oct 2016 16:14:46 +0200 Subject: [Lazarus] TDBEdit, TStringField Size, DataSize, DisplayWidth and MaxLength In-Reply-To: <401a8d0d-47a2-92d8-d38c-b06e372aefbf@mccallumwhyman.com> References: <035d4254-63a5-95f2-05a3-4fdd2136c9c0@mccallumwhyman.com> <5346d810-7d86-454d-f514-90b62610499a@zoznam.sk> <401a8d0d-47a2-92d8-d38c-b06e372aefbf@mccallumwhyman.com> Message-ID: <201610111614.46770.mse00000@gmail.com> On Tuesday 11 October 2016 15:48:15 Tony Whyman via Lazarus wrote: > Please look at changes in TRUNK. > > > May be that not all is perfect, but you will see there direction ... > > > > -Laco. > > Which FPC version is this likely to be released in? > > On a quick review of the code, all seems good. Just one point: > GetDataSize seems to acknowledge CP_UTF8 as the only multibyte character > set. The Firebird character set GB18030 (Chinese characters) is > multi-byte (see wikipedia) and has code page 54936. I believe PostgreSQL > also supports it. MSEgui uses below code in order to guess the Firebird character size: " SQL_TEXT,SQL_VARYING: begin size:= metadata.getlength(fapi.status,i1); datatype:= ftstring; i2:= metadata.getcharset(fapi.status,i1); if _type = SQL_TEXT then begin fetchfunc:= @fetchtext; if i2 = cs_binary then begin if size = 16 then begin datatype:= ftguid; fetchfunc:= @fetchguid; size:= 0; end else begin datatype:= ftbytes; end; end; end else begin if i2 = cs_binary then begin datatype:= ftvarbytes; fetchfunc:= @fetchvarbytes; end else begin fetchfunc:= @fetchvarchar; end; end; case i2 of 5,6,8,44,56,57,64: begin i3:= 2; end; 3: begin i3:= 3; end; 4,59: begin i3:= 4; end; else begin i3:= 1; end; end; size:= size div i3; end; " From https://gitlab.com/mseide-msegui/mseide-msegui/blob/master/lib/common/db/msefbconnection.pas Martin From tony.whyman at mccallumwhyman.com Tue Oct 11 16:19:18 2016 From: tony.whyman at mccallumwhyman.com (Tony Whyman) Date: Tue, 11 Oct 2016 15:19:18 +0100 Subject: [Lazarus] TDBEdit, TStringField Size, DataSize, DisplayWidth and MaxLength In-Reply-To: <201610111614.46770.mse00000@gmail.com> References: <035d4254-63a5-95f2-05a3-4fdd2136c9c0@mccallumwhyman.com> <5346d810-7d86-454d-f514-90b62610499a@zoznam.sk> <401a8d0d-47a2-92d8-d38c-b06e372aefbf@mccallumwhyman.com> <201610111614.46770.mse00000@gmail.com> Message-ID: <6aec77f3-49fd-f7c9-5578-f7442e909174@mccallumwhyman.com> On 11/10/16 15:14, Martin Schreiber via Lazarus wrote: > case i2 of > 5,6,8,44,56,57,64: begin Agree with 5,6, 44, 56, 57 as two byte character sets. 8 doesn't seem to exist (at least in my version). 64 is KOI8U. According to Wikipedia "KOI8-U is an 8-bit character encoding, designed to cover Ukrainian, which uses a Cyrillic alphabet. It is based on KOI8-R, which covers Russian and Bulgarian, but replaces eight graphic characters with four Ukrainian letters Ґ, Є, І, and Ї in both upper case and lower case." It should be the same character width as character set 63 (KOI8R) i.e. 1. From tony.whyman at mccallumwhyman.com Tue Oct 11 16:23:55 2016 From: tony.whyman at mccallumwhyman.com (Tony Whyman) Date: Tue, 11 Oct 2016 15:23:55 +0100 Subject: [Lazarus] TDBEdit, TStringField Size, DataSize, DisplayWidth and MaxLength In-Reply-To: <201610111614.46770.mse00000@gmail.com> References: <035d4254-63a5-95f2-05a3-4fdd2136c9c0@mccallumwhyman.com> <5346d810-7d86-454d-f514-90b62610499a@zoznam.sk> <401a8d0d-47a2-92d8-d38c-b06e372aefbf@mccallumwhyman.com> <201610111614.46770.mse00000@gmail.com> Message-ID: <50b67d8a-762f-47e6-d116-d541fea452bc@mccallumwhyman.com> On 11/10/16 15:14, Martin Schreiber via Lazarus wrote: > MSEgui uses below code in order to guess the Firebird character size: > " FYI, this is the table IBX uses to look up character sets and code pages: CharSetMap: array [0..69] of TCharsetMap = ( (CharsetID: 0; CharSetName: 'NONE'; CharSetWidth: 1; CodePage: CP_NONE), (CharsetID: 1; CharSetName: 'OCTETS'; CharSetWidth: 1; CodePage: CP_NONE), (CharsetID: 2; CharSetName: 'ASCII'; CharSetWidth: 1; CodePage: CP_ASCII), (CharsetID: 3; CharSetName: 'UNICODE_FSS'; CharSetWidth: 3; CodePage: CP_UTF8), (CharsetID: 4; CharSetName: 'UTF8'; CharSetWidth: 4; CodePage: CP_UTF8), (CharsetID: 5; CharSetName: 'SJIS_0208'; CharSetWidth: 2; CodePage: 20932), (CharsetID: 6; CharSetName: 'EUCJ_0208'; CharSetWidth: 2; CodePage: 20932), (CharsetID: 7; CharSetName: 'Unknown'; CharSetWidth: 0; CodePage: CP_NONE), (CharsetID: 8; CharSetName: 'Unknown'; CharSetWidth: 0; CodePage: CP_NONE), (CharsetID: 9; CharSetName: 'DOS737'; CharSetWidth: 1; CodePage: 737), (CharsetID: 10; CharSetName: 'DOS437'; CharSetWidth: 1; CodePage: 437), (CharsetID: 11; CharSetName: 'DOS850'; CharSetWidth: 1; CodePage: 850), (CharsetID: 12; CharSetName: 'DOS865'; CharSetWidth: 1; CodePage: 865), (CharsetID: 13; CharSetName: 'DOS860'; CharSetWidth: 1; CodePage: 860), (CharsetID: 14; CharSetName: 'DOS863'; CharSetWidth: 1; CodePage: 863), (CharsetID: 15; CharSetName: 'DOS775'; CharSetWidth: 1; CodePage: 775), (CharsetID: 16; CharSetName: 'DOS858'; CharSetWidth: 1; CodePage: 858), (CharsetID: 17; CharSetName: 'DOS862'; CharSetWidth: 1; CodePage: 862), (CharsetID: 18; CharSetName: 'DOS864'; CharSetWidth: 1; CodePage: 864), (CharsetID: 19; CharSetName: 'NEXT'; CharSetWidth: 1; CodePage: CP_NONE), (CharsetID: 20; CharSetName: 'Unknown'; CharSetWidth: 0; CodePage: CP_NONE), (CharsetID: 21; CharSetName: 'ISO8859_1'; CharSetWidth: 1; CodePage: 28591), (CharsetID: 22; CharSetName: 'ISO8859_2'; CharSetWidth: 1; CodePage: 28592), (CharsetID: 23; CharSetName: 'ISO8859_3'; CharSetWidth: 1; CodePage: 28593), (CharsetID: 24; CharSetName: 'Unknown'; CharSetWidth: 0; CodePage: CP_NONE), (CharsetID: 25; CharSetName: 'Unknown'; CharSetWidth: 0; CodePage: CP_NONE), (CharsetID: 26; CharSetName: 'Unknown'; CharSetWidth: 0; CodePage: CP_NONE), (CharsetID: 27; CharSetName: 'Unknown'; CharSetWidth: 0; CodePage: CP_NONE), (CharsetID: 28; CharSetName: 'Unknown'; CharSetWidth: 0; CodePage: CP_NONE), (CharsetID: 29; CharSetName: 'Unknown'; CharSetWidth: 0; CodePage: CP_NONE), (CharsetID: 30; CharSetName: 'Unknown'; CharSetWidth: 0; CodePage: CP_NONE), (CharsetID: 31; CharSetName: 'Unknown'; CharSetWidth: 0; CodePage: CP_NONE), (CharsetID: 32; CharSetName: 'Unknown'; CharSetWidth: 0; CodePage: CP_NONE), (CharsetID: 33; CharSetName: 'Unknown'; CharSetWidth: 0; CodePage: CP_NONE), (CharsetID: 34; CharSetName: 'ISO8859_4'; CharSetWidth: 1; CodePage: 28594), (CharsetID: 35; CharSetName: 'ISO8859_5'; CharSetWidth: 1; CodePage: 28595), (CharsetID: 36; CharSetName: 'ISO8859_6'; CharSetWidth: 1; CodePage: 28596), (CharsetID: 37; CharSetName: 'ISO8859_7'; CharSetWidth: 1; CodePage: 28597), (CharsetID: 38; CharSetName: 'ISO8859_8'; CharSetWidth: 1; CodePage: 28598), (CharsetID: 39; CharSetName: 'ISO8859_9'; CharSetWidth: 1; CodePage: 28599), (CharsetID: 40; CharSetName: 'ISO8859_13'; CharSetWidth: 1; CodePage: 28603), (CharsetID: 41; CharSetName: 'Unknown'; CharSetWidth: 0; CodePage: CP_NONE), (CharsetID: 42; CharSetName: 'Unknown'; CharSetWidth: 0; CodePage: CP_NONE), (CharsetID: 43; CharSetName: 'Unknown'; CharSetWidth: 0; CodePage: CP_NONE), (CharsetID: 44; CharSetName: 'KSC_5601'; CharSetWidth: 2; CodePage: 949), (CharsetID: 45; CharSetName: 'DOS852'; CharSetWidth: 1; CodePage: 852), (CharsetID: 46; CharSetName: 'DOS857'; CharSetWidth: 1; CodePage: 857), (CharsetID: 47; CharSetName: 'DOS861'; CharSetWidth: 1; CodePage: 861), (CharsetID: 48; CharSetName: 'DOS866'; CharSetWidth: 1; CodePage: 866), (CharsetID: 49; CharSetName: 'DOS869'; CharSetWidth: 1; CodePage: 869), (CharsetID: 50; CharSetName: 'CYRL'; CharSetWidth: 1; CodePage: 1251), (CharsetID: 51; CharSetName: 'WIN1250'; CharSetWidth: 1; CodePage: 1250), (CharsetID: 52; CharSetName: 'WIN1251'; CharSetWidth: 1; CodePage: 1251), (CharsetID: 53; CharSetName: 'WIN1252'; CharSetWidth: 1; CodePage: 1252), (CharsetID: 54; CharSetName: 'WIN1253'; CharSetWidth: 1; CodePage: 1253), (CharsetID: 55; CharSetName: 'WIN1254'; CharSetWidth: 1; CodePage: 1254), (CharsetID: 56; CharSetName: 'BIG_5'; CharSetWidth: 2; CodePage: 950), (CharsetID: 57; CharSetName: 'GB_2312'; CharSetWidth: 2; CodePage: 936), (CharsetID: 58; CharSetName: 'WIN1255'; CharSetWidth: 1; CodePage: 1255), (CharsetID: 59; CharSetName: 'WIN1256'; CharSetWidth: 1; CodePage: 1256), (CharsetID: 60; CharSetName: 'WIN1257'; CharSetWidth: 1; CodePage: 1257), (CharsetID: 61; CharSetName: 'Unknown'; CharSetWidth: 0; CodePage: CP_NONE), (CharsetID: 62; CharSetName: 'Unknown'; CharSetWidth: 0; CodePage: CP_NONE), (CharsetID: 63; CharSetName: 'KOI8R'; CharSetWidth: 1; CodePage: 20866), (CharsetID: 64; CharSetName: 'KOI8U'; CharSetWidth: 1; CodePage: 21866), (CharsetID: 65; CharSetName: 'WIN1258'; CharSetWidth: 1; CodePage: 1258), (CharsetID: 66; CharSetName: 'TIS620'; CharSetWidth: 1; CodePage: 874), (CharsetID: 67; CharSetName: 'GBK'; CharSetWidth: 2; CodePage: 936), (CharsetID: 68; CharSetName: 'CP943C'; CharSetWidth: 2; CodePage: 943), (CharsetID: 69; CharSetName: 'GB18030'; CharSetWidth: 4; CodePage: 54936) From mse00000 at gmail.com Tue Oct 11 17:52:18 2016 From: mse00000 at gmail.com (Martin Schreiber) Date: Tue, 11 Oct 2016 17:52:18 +0200 Subject: [Lazarus] TDBEdit, TStringField Size, DataSize, DisplayWidth and MaxLength In-Reply-To: <6aec77f3-49fd-f7c9-5578-f7442e909174@mccallumwhyman.com> References: <035d4254-63a5-95f2-05a3-4fdd2136c9c0@mccallumwhyman.com> <201610111614.46770.mse00000@gmail.com> <6aec77f3-49fd-f7c9-5578-f7442e909174@mccallumwhyman.com> Message-ID: <201610111752.18517.mse00000@gmail.com> On Tuesday 11 October 2016 16:19:18 Tony Whyman via Lazarus wrote: > On 11/10/16 15:14, Martin Schreiber via Lazarus wrote: > > case i2 of > > 5,6,8,44,56,57,64: begin > > Agree with 5,6, 44, 56, 57 as two byte character sets. > > 8 doesn't seem to exist (at least in my version). > > 64 is KOI8U. According to Wikipedia "KOI8-U is an 8-bit character > encoding, designed to cover Ukrainian, which uses a Cyrillic alphabet. > It is based on KOI8-R, which covers Russian and Bulgarian, but replaces > eight graphic characters with four Ukrainian letters Ґ, Є, І, and Ї in > both upper case and lower case." > > It should be the same character width as character set 63 (KOI8R) i.e. 1. I don't remember from where I got the numbers. Maybe by reading FB-sources or reading RDB$BYTES_PER_CHARACTER. On my current FB 2.5 installation "64" actually is 1 byte per character, thanks for pointing it out, it allready has been fixed in git master. In MSEgui and the newer ZEOSlib versions the datasize of a string in TDataset record buffer is sizeof(pointer). In MSEgui it is a UnicodeString in ZEOS IIRC a pointer to a special string record. Martin From lacak at zoznam.sk Tue Oct 11 20:21:29 2016 From: lacak at zoznam.sk (LacaK) Date: Tue, 11 Oct 2016 20:21:29 +0200 Subject: [Lazarus] TDBEdit, TStringField Size, DataSize, DisplayWidth and MaxLength In-Reply-To: <401a8d0d-47a2-92d8-d38c-b06e372aefbf@mccallumwhyman.com> References: <035d4254-63a5-95f2-05a3-4fdd2136c9c0@mccallumwhyman.com> <5346d810-7d86-454d-f514-90b62610499a@zoznam.sk> <401a8d0d-47a2-92d8-d38c-b06e372aefbf@mccallumwhyman.com> Message-ID: An HTML attachment was scrubbed... URL: From aaa5500 at ya.ru Wed Oct 12 00:41:49 2016 From: aaa5500 at ya.ru (Alexey) Date: Wed, 12 Oct 2016 01:41:49 +0300 Subject: [Lazarus] Wish, remove this GTK2 debug line In-Reply-To: <20161011155935.36e75a5a@limapholos.matflo.wg> References: <741ecfd4-a9c2-7aab-32e6-22b7a5082d38@geldenhuys.co.uk> <20161010114932.60b1327e@limapholos.matflo.wg> <20161010121137.19e18c6b@limapholos.matflo.wg> <20161010132141.705f52ce@limapholos.matflo.wg> <20161010145318.70273304@limapholos.matflo.wg> <20161011155935.36e75a5a@limapholos.matflo.wg> Message-ID: <1d04931a-0df1-a555-099c-951cc883626c@ya.ru> On 11.10.2016 16:59, Mattias Gaertner via Lazarus wrote: > Please create bug report with an example to reproduce this. Hm, this is work to make an example; why not to comment this msg in GTK2 widget? -- Regards, Alex From juha.manninen62 at gmail.com Wed Oct 12 00:51:26 2016 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Wed, 12 Oct 2016 01:51:26 +0300 Subject: [Lazarus] Wish, remove this GTK2 debug line In-Reply-To: <1d04931a-0df1-a555-099c-951cc883626c@ya.ru> References: <741ecfd4-a9c2-7aab-32e6-22b7a5082d38@geldenhuys.co.uk> <20161010114932.60b1327e@limapholos.matflo.wg> <20161010121137.19e18c6b@limapholos.matflo.wg> <20161010132141.705f52ce@limapholos.matflo.wg> <20161010145318.70273304@limapholos.matflo.wg> <20161011155935.36e75a5a@limapholos.matflo.wg> <1d04931a-0df1-a555-099c-951cc883626c@ya.ru> Message-ID: On Wed, Oct 12, 2016 at 1:41 AM, Alexey via Lazarus wrote: > Hm, this is work to make an example; why not to comment this msg in GTK2 > widget? You can comment it. You have the sources. However it must be kept in the public sources because it is a valid warning. Juha From l.rame at griensu.com Wed Oct 12 14:18:27 2016 From: l.rame at griensu.com (=?UTF-8?Q?Leonardo_M._Ram=c3=a9?=) Date: Wed, 12 Oct 2016 09:18:27 -0300 Subject: [Lazarus] Fast-small utilities for common javascript tasks, anyone? In-Reply-To: References: <89e6ac5e-b4a9-3aae-c9ce-eb23410ab890@griensu.com> <9d46f703-bc36-1b4c-d8b9-1b4cc825091b@griensu.com> Message-ID: <71ad79f1-b7b8-bd23-3a51-5dca00a55a1f@griensu.com> El 08/10/16 a las 05:18, Michael Van Canneyt via Lazarus escribió: > >> >> Hi Michael, could you post jsmin.pas here?. > > I added it to FPC SVN. packages/fcl-js, unit jsminifier. I included > an example program. > > Improvements and suggestions welcome. > > Michael. Thanks Michael, that's great!. BTW, I've found also a CSS Minifier, developed by Udo Schmal (http://www.gocher.me/CSSMin) I'll ask him if he allow us to add it to fcl-js. Regards, -- Leonardo M. Ramé Medical IT - Griensu S.A. Av. Colón 636 - Piso 8 Of. A X5000EPT -- Córdoba Tel.: +54(351)4246924 +54(351)4247788 +54(351)4247979 int. 19 Cel.: +54 9 (011) 40871877 From tony.whyman at mccallumwhyman.com Wed Oct 12 15:02:01 2016 From: tony.whyman at mccallumwhyman.com (Tony Whyman) Date: Wed, 12 Oct 2016 14:02:01 +0100 Subject: [Lazarus] TDBEdit, TStringField Size, DataSize, DisplayWidth and MaxLength In-Reply-To: References: <035d4254-63a5-95f2-05a3-4fdd2136c9c0@mccallumwhyman.com> <5346d810-7d86-454d-f514-90b62610499a@zoznam.sk> <401a8d0d-47a2-92d8-d38c-b06e372aefbf@mccallumwhyman.com> Message-ID: <53409657-ab40-a37f-db11-2f42f3e62582@mccallumwhyman.com> On 11/10/16 19:21, LacaK via Lazarus wrote: > I am aware of it. I have not added all other MBCS because ! I doubt, > which are realy used nowadays. > My guess is that UTF-8 is far most used / supported as client > character set. > No problem to add them if there will be real demand from users ... Perhaps the correct answer is to let the database driver work this one out rather than have a fixed decision in the FCL. I would suggest the following change: function TStringField.GetDataSize: Integer; begin Result := FieldDef.CharSize * Size + 1; // case FCodePage of // CP_UTF8: Result := 4*Size+1; // else Result := Size+1; // end; end; TFieldDef.GetCharSize uses the same algorithm so this avoids a code duplication anyway. But I also want to make TFieldDef.GetCharSize and TFieldDef.CreateField virtual methods. That way a database driver can readily expand upon the character sets supported to match what it supports rather than be limited by the FCL default. In IBX, I have already done this using TIBFieldDef and TIBStringField as subclasses in order to pass character set information. However, because TFieldDef.CreateField is non-virtual, the implementation is not as elegant as it should be. That is the extra info is added to the TIBStringField as the dataset is opened rather than when the field is created. It is also less maintainable as the functionality should be in TIBFieldDef rather than in a different class altogether. Making those two methods virtual is the most important change. I can live with TStringField.GetDataSize as it is because that is already virtual and a future TIBStringField can readily override it. Tony Whyman MWA -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at freepascal.org Wed Oct 12 15:50:24 2016 From: michael at freepascal.org (Michael Van Canneyt) Date: Wed, 12 Oct 2016 15:50:24 +0200 (CEST) Subject: [Lazarus] Fast-small utilities for common javascript tasks, anyone? In-Reply-To: <71ad79f1-b7b8-bd23-3a51-5dca00a55a1f@griensu.com> References: <89e6ac5e-b4a9-3aae-c9ce-eb23410ab890@griensu.com> <9d46f703-bc36-1b4c-d8b9-1b4cc825091b@griensu.com> <71ad79f1-b7b8-bd23-3a51-5dca00a55a1f@griensu.com> Message-ID: On Wed, 12 Oct 2016, Leonardo M. Ramé via Lazarus wrote: > El 08/10/16 a las 05:18, Michael Van Canneyt via Lazarus escribió: >> >>> >>> Hi Michael, could you post jsmin.pas here?. >> >> I added it to FPC SVN. packages/fcl-js, unit jsminifier. I included >> an example program. >> >> Improvements and suggestions welcome. >> >> Michael. > > Thanks Michael, that's great!. > > BTW, I've found also a CSS Minifier, developed by Udo Schmal > (http://www.gocher.me/CSSMin) I'll ask him if he allow us to add it to > fcl-js. Great, that would come in handy as well !! Michael. From adearmas at gmail.com Wed Oct 12 20:10:50 2016 From: adearmas at gmail.com (Adrian De Armas) Date: Wed, 12 Oct 2016 15:10:50 -0300 Subject: [Lazarus] Teaching Pascal at College Message-ID: Hello everyone, I am a professor of "introduction to programming". Currently we are working with matlab and c. Today I had a meeting about doing the module more interesting to the students. Currently we teach algorithms making console applications and usually I receive questions like "Why don't we do something more modern?". I recommended that we should use Pascal in General and Lazarus in particular to teach how to create rich GUI Applications and to my surprise the idea was well recieved. Now I have to make suggestions about how to prepare the module starting from zero. Students do not know how to program and I need to include subjects as: variable declaration, operations, if, while, for, functions and procedure, arrays and multidimensional arrays. I would love to know what you think about making the transition from console to GUI. This is an exciting opportunity I'd love to make it right. Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From list2010 at BrenemanLabs.com Wed Oct 12 20:48:21 2016 From: list2010 at BrenemanLabs.com (Paul Breneman) Date: Wed, 12 Oct 2016 13:48:21 -0500 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: Message-ID: <3b51c3da-17fb-e74f-17ad-caa4deefe903@BrenemanLabs.com> On 10/12/2016 01:10 PM, Adrian De Armas via Lazarus wrote: > Hello everyone, > I am a professor of "introduction to programming". Currently we are working > with matlab and c. > > Today I had a meeting about doing the module more interesting to the > students. Currently we teach algorithms making console applications and > usually I receive questions like "Why don't we do something more modern?". > > I recommended that we should use Pascal in General and Lazarus in > particular to teach how to create rich GUI Applications and to my surprise > the idea was well recieved. Now I have to make suggestions about how to > prepare the module starting from zero. Students do not know how to program > and I need to include subjects as: variable declaration, operations, if, > while, for, functions and procedure, arrays and multidimensional arrays. > > I would love to know what you think about making the transition from > console to GUI. > This is an exciting opportunity I'd love to make it right. As an electrical engineer (starting study at age 14) I've always enjoyed learning programming when it is *combined* with hardware. There are links to two such projects at the top of this page: http://controlpascal.com/tutorial.htm There is a link near the bottom of that page to *ideU* which might be one way to transition from console to GUI. Please keep us informed about how things progress! Regard, Paul From kellingc at cox.net Wed Oct 12 20:52:36 2016 From: kellingc at cox.net (Chris Kelling) Date: Wed, 12 Oct 2016 18:52:36 +0000 (GMT) Subject: [Lazarus] Teaching Pascal at College Message-ID: <1926d85.2834d.157ba3d36f6.Webtop.0@cox.net> I'll tell you, after years of doing top down modular programming, it took me a little time to adjust to event driven programing. It wasn't until I used a FOR loop on a form to collect the input that I realized what the difference is. For a beginning student, you can approach it in two ways - teach programming concepts or just teach the language. This is what I learned in my Computer Science classes. I had a couple of classmates who were hot shots in JAVA by reading the tutorials online. Where as their mastery of JAVA was impressive, they had no concept of what they were doing in the context of programming. This was a data structures class, and concepts and how to apply them was totally lost on them. Their code was sloppy, inefficient, and very hard to troubleshoot. One exercise in my C class called for creating a linked list. I used recursion, which took my instructor off guard. He said it wouldn't work, and I asked, "It worked on all my tests, should I stop doing it this way?" He looked at my code again, get a huge smile and remarked that I used recursion. I said yes, the pre-req for the course was programming I and II, which is where we learned recursion. He still have me more credit because most students were using some king of loop The point being, the language doesn't matter except for syntax. Programming is programming. That being said, more to what you asked. To understand how the more advanced concepts work and are used, there needs to be a broad base. I still write a lot of my logic in a unit and then add that unit into a project. Defiantly start them off making simple console programs just to demonstrate the concepts. I'd do it via the Lazarus IDE so they get used to that environment. After they have the basic concepts, introduce what Lazarus is - a group of libraries extending FPC into the visual design. They should have enough of a grasp on the concept of say arrays to understand how a list control works, or how you can use conditional branching (both IF -THEN-ELSE and CASE) to check for radio button and check box states. But then again, I'm not a professional educator. -Chris On Wed, Oct 12, 2016 at 2:10 PM, Adrian De Armas via Lazarus wrote: Hello everyone, I am a professor of "introduction to programming". Currently we are working with matlab and c. Today I had a meeting about doing the module more interesting to the students. Currently we teach algorithms making console applications and usually I receive questions like "Why don't we do something more modern?".  I recommended that we should use Pascal in General and Lazarus in particular to teach how to create rich GUI Applications and to my surprise the idea was well recieved. Now I have to make suggestions about how to prepare the module starting from zero. Students do not know how to program and I need to include subjects as: variable declaration, operations, if, while, for, functions and procedure, arrays and multidimensional arrays. I would love to know what you think about making the transition from console to GUI. This is an exciting opportunity I'd love to make it right. Regards ------------------------------ -- _______________________________________________ Lazarus mailing list Lazarus at lists.lazarus-ide.org   http://lists.lazarus-ide.org/listinfo/lazarus   -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.e.sanliturk at gmail.com Wed Oct 12 22:52:39 2016 From: m.e.sanliturk at gmail.com (Mehmet Erol Sanliturk) Date: Wed, 12 Oct 2016 13:52:39 -0700 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <1926d85.2834d.157ba3d36f6.Webtop.0@cox.net> References: <1926d85.2834d.157ba3d36f6.Webtop.0@cox.net> Message-ID: On Wed, Oct 12, 2016 at 11:52 AM, Chris Kelling via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > I'll tell you, after years of doing top down modular programming, it took > me a little time to adjust to event driven programing. It wasn't until I > used a FOR loop on a form to collect the input that I realized what the > difference is. > > For a beginning student, you can approach it in two ways - teach > programming concepts or just teach the language. This is what I learned in > my Computer Science classes. > > I had a couple of classmates who were hot shots in JAVA by reading the > tutorials online. Where as their mastery of JAVA was impressive, they had > no concept of what they were doing in the context of programming. This was > a data structures class, and concepts and how to apply them was totally > lost on them. Their code was sloppy, inefficient, and very hard to > troubleshoot. > > One exercise in my C class called for creating a linked list. I used > recursion, which took my instructor off guard. He said it wouldn't work, > and I asked, "It worked on all my tests, should I stop doing it this way?" > He looked at my code again, get a huge smile and remarked that > I used recursion. I said yes, the pre-req for the course was programming > I and II, which is where we learned recursion. He still have me more > credit because most students were using some king of loop > > The point being, the language doesn't matter except for syntax. > Programming is programming. That being said, more to what you asked. > > To understand how the more advanced concepts work and are used, there > needs to be a broad base. I still write a lot of my logic in a unit and > then add that unit into a project. Defiantly start them off making simple > console programs just to demonstrate the concepts. I'd do it via the > Lazarus IDE so they get used to that environment. After they have the > basic concepts, introduce what Lazarus is - a group of libraries extending > FPC into the visual design. They should have enough of a grasp on the > concept of say arrays to understand how a > list control works, or how you can use conditional branching (both IF > -THEN-ELSE and CASE) to check for radio button and check box states. > > But then again, I'm not a professional educator. > > -Chris > > On Wed, Oct 12, 2016 at 2:10 PM, Adrian De Armas via Lazarus wrote: > > Hello everyone, I am a professor of "introduction to programming". > Currently we are working with matlab and c. > > > Today I had a meeting about doing the module more interesting to the > students. Currently we teach algorithms making console applications and > usually I receive questions like "Why don't we do something more modern?". > > > I recommended that we should use Pascal in General and Lazarus in > particular to teach how to create rich GUI Applications and to my surprise > the idea was well recieved. Now I have to make suggestions about how to > prepare the module starting from zero. Students do not know how to program > and I need to include subjects as: variable declaration, operations, if, > while, for, functions and procedure, arrays and multidimensional arrays. > > > I would love to know what you think about making the transition from > console to GUI. > This is an exciting opportunity I'd love to make it right. > > > Regards > > > ------------------------------ > > I have taught mostly Fortran programming to the students ( with Cobol , but , less frequently ) in a University ( Pascal in another University ) . In those days , there was no any GUI programming facility like Lazarus . When GUI is started , it was assumed that the students may learn more effectively . My opinion is that such an assumption is misleading , because , it is very easy to generate a GUI program . When it comes to perform some , let's say , data processing , it is becoming necessary to write some Pascal procedure parts ( or procedures ) within GUI program . In that part , the students becoming helpless because they do not know how to write such procedures or parts . To help to the students , my opinion is that , a double way approach should be used : First teach how to program in plain Pascal , for example , input - process - output in a console program which is easy to write . After the students have learned what can be down , embed main steps of this console program into a Lazarus ( GUI ) program . In that way , the students will learn how to write an algorithm in Pascal and test it in a simple console program , and then how to make it a GUI program . They in that way learn how to generate a GUI program . Sometimes by beginning from a console program or directly beginning a GUI program and improve its procedures supplied by Lazarus generated sources , they will be able to develop a software by selecting whichever way is easy and suitable for them . Mehmet Erol Sanliturk -------------- next part -------------- An HTML attachment was scrubbed... URL: From tony.whyman at mccallumwhyman.com Thu Oct 13 00:46:41 2016 From: tony.whyman at mccallumwhyman.com (Tony Whyman) Date: Wed, 12 Oct 2016 23:46:41 +0100 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: Message-ID: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> When I read your post ,it sent me back to read the Introduction to Nicklaus Wirth's original "Pascal user Manual and Report" where the opening paragraph says: "The development of the language Pascal is based on two principal aims. The first is to make available a language suitable to teach programming as a systematic discipline based on certain fundamental concepts clearly and naturally reflected by the language. The second is to develop implementations of this language which are both reliable and efficient on presently available (1975) computers". Certainly the intent was a very good match for what you want and IMHO that intent was fully realised. If you can find it, I would recommend getting hold of a copy of what is now an ancient text "Pascal - An Introduction to Methodical Programming - Findlay and Watt - ISBN 0 273 01220 7 (Original Edition) now 978-1857283648". First published 1978. This used to be the definitive text for learning Pascal and somewhat to my surprise still seems to be available from Amazon in its 3rd Edition. When I looked down through the content list the order of play and presentation still seems just right for a first course in programming. It does not deal with Object Oriented programming or even "Units". ISO standard Pascal will still some time away but that anyway should be the next semester. I would also caution against starting on GUI programming too early. If the students don't have a grasp of fundamentals then they will get lost very quickly. Perhaps the best approach is at the end of each subject to translate the simple procedural program they have been working on into a GUI program as a whole class exercise. From having myself developed many courses in Data Communications over the years, I would also always try and make sure the students understand the context, the background to what they are doing and why. Somehow you need to get Boolean Algebra in there as well. Findlay and Watt give a primer on this in chapter 5, which is probably about the right stage after having done the basics. And then, of course, there are Turing Machines... Have fun Tony Whyman MWA On 12/10/16 19:10, Adrian De Armas via Lazarus wrote: > Hello everyone, > I am a professor of "introduction to programming". Currently we are > working with matlab and c. > > Today I had a meeting about doing the module more interesting to the > students. Currently we teach algorithms making console applications > and usually I receive questions like "Why don't we do something more > modern?". > > I recommended that we should use Pascal in General and Lazarus in > particular to teach how to create rich GUI Applications and to my > surprise the idea was well recieved. Now I have to make suggestions > about how to prepare the module starting from zero. Students do not > know how to program and I need to include subjects as: variable > declaration, operations, if, while, for, functions and procedure, > arrays and multidimensional arrays. > > I would love to know what you think about making the transition from > console to GUI. > This is an exciting opportunity I'd love to make it right. > > Regards > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lacak at zoznam.sk Thu Oct 13 07:33:22 2016 From: lacak at zoznam.sk (LacaK) Date: Thu, 13 Oct 2016 07:33:22 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> Message-ID: <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> > I would also caution against starting on GUI programming too early. +1 (few years ago I have teached programing on school in our city. I am not a techaer, but school lost teacher and was not able to find someone else) I have used FreePascal + Lazarus for my courses, but we have used only project type of "Program" (so no LCL GUI), exactly for reasons what was mentioned. I understand, that black/white window does not look modern. You can introduce 2 courses: 1. Introduction to Pascal (Object Pascal) 2. GUI programing L. From mse00000 at gmail.com Thu Oct 13 08:01:10 2016 From: mse00000 at gmail.com (Martin Schreiber) Date: Thu, 13 Oct 2016 08:01:10 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: Message-ID: <201610130801.10302.mse00000@gmail.com> On Wednesday 12 October 2016 20:10:50 Adrian De Armas via Lazarus wrote: > Today I had a meeting about doing the module more interesting to the > students. Currently we teach algorithms making console applications and > usually I receive questions like "Why don't we do something more modern?". > I made such an experiment with Free Pascal and MSEide+MSEgui: https://sourceforge.net/projects/mseuniverse/files/book/ "programmierspass_0_1.zip" contains the text and example code (German). Martin From mailinglists at geldenhuys.co.uk Thu Oct 13 10:20:57 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 13 Oct 2016 09:20:57 +0100 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> Message-ID: On 2016-10-13 06:33, LacaK via Lazarus wrote: > I understand, that black/white window does not look modern. You can > introduce 2 courses: > 1. Introduction to Pascal (Object Pascal) > 2. GUI programing +1 That would be the best solution. GUI programming is based on fundamentals than need to be understood first. We don't want another whole generation of Visual Basic programmers. The Visual Basic 4-6 programs I had seen and unfortunately had to maintain were the sloppiest code I've ever seen - all written by "programmers" that dived straight into VB with no prior programming experience. 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 Thu Oct 13 10:28:29 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 13 Oct 2016 09:28:29 +0100 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <1926d85.2834d.157ba3d36f6.Webtop.0@cox.net> References: <1926d85.2834d.157ba3d36f6.Webtop.0@cox.net> Message-ID: <32abeafc-9fcd-8fac-e48f-4b16dbce28e3@geldenhuys.co.uk> On 2016-10-12 19:52, Chris Kelling via Lazarus wrote: > I would love to know what you think about making the transition from > console to GUI. All kids/students love games, so introducing programming with games in mind helps keep their attention. Here is a link to some online and free course material. Take a look at the "Coding with Pascal - writing the Pong game". http://www.clubengineer.org/online-learning I would still teach them the basics of the language first, then introduce GUI programming as Stage 2. 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 mschnell at lumino.de Thu Oct 13 11:04:57 2016 From: mschnell at lumino.de (Michael Schnell) Date: Thu, 13 Oct 2016 11:04:57 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: Message-ID: On 12.10.2016 20:10, Adrian De Armas via Lazarus wrote: > "Why don't we do something more modern?". I don't think Pascal is "modern" at all. IMHO it's a shame, but new projects in Pascal seem to be declining, even though, or maybe exactly because, the quality of the language is great and enforces an elaborated programming style creating decently predictable results. More "sloppy" languages like Java or Python seem more "modern, right now. -Michael From mschnell at lumino.de Thu Oct 13 11:14:25 2016 From: mschnell at lumino.de (Michael Schnell) Date: Thu, 13 Oct 2016 11:14:25 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: Message-ID: <066d0a1e-3b93-1c02-00d9-edd91ce2e228@lumino.de> On 12.10.2016 20:10, Adrian De Armas via Lazarus wrote: > teach how to create rich GUI Applications and to my surprise the idea > was well recieved. Now I have to make suggestions about how to prepar The GUI development in Lazarus is not "modern" at all (but IMHO a *very* decent way to do a GUI). Embarcadero Delphi changed to the "FireMonkey" GUI builder, that is intended to do a "modern" "dynamic" GUI, more suitable for mobile-trained users. Regarding building a GUI, the "RAD" paradigm seems not to to be widely accepted any more, but a dedicated GUI builder, separated from the language code, is recommended in many places, even though a lot more clumsy than Delphi-alike RAD. -Michael -------------- next part -------------- An HTML attachment was scrubbed... URL: From mailinglists at geldenhuys.co.uk Thu Oct 13 12:02:32 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 13 Oct 2016 11:02:32 +0100 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: Message-ID: <0033ad35-491e-87fa-c287-b47070aca673@geldenhuys.co.uk> On 2016-10-13 10:04, Michael Schnell via Lazarus wrote: > IMHO it's a shame, but new > projects in Pascal seem to be declining, That's got nothing to do with the Object Pascal being modern or not (I think it is modern enough). The decline is about marketing and popularity contests, and management decisions (how easy is it to replace a Object Pascal developers vs a Java developer). Delphi being sold every other year doesn't help with the stability of Object Pascal in the marketplace either. Regards, Graeme From m.e.sanliturk at gmail.com Thu Oct 13 15:32:03 2016 From: m.e.sanliturk at gmail.com (Mehmet Erol Sanliturk) Date: Thu, 13 Oct 2016 06:32:03 -0700 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <0033ad35-491e-87fa-c287-b47070aca673@geldenhuys.co.uk> References: <0033ad35-491e-87fa-c287-b47070aca673@geldenhuys.co.uk> Message-ID: On Thu, Oct 13, 2016 at 3:02 AM, Graeme Geldenhuys via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > On 2016-10-13 10:04, Michael Schnell via Lazarus wrote: > > IMHO it's a shame, but new > > projects in Pascal seem to be declining, > > That's got nothing to do with the Object Pascal being modern or not (I > think it is modern enough). The decline is about marketing and > popularity contests, and management decisions (how easy is it to replace > a Object Pascal developers vs a Java developer). > > Delphi being sold every other year doesn't help with the stability of > Object Pascal in the marketplace either. > > Regards, > Graeme > > -- > _______________________________________________ > Free Pascal is a "Turing complete" and "Resource complete" language , means it is not "lower" than any other programming language whatever it is . The unfortunate situation is that Free Pascal ( and Lazarus ) is alone , i.e., there is no any other competing compiler production SIMILAR to Free Pascal . Also Free Pascal is a voluntary project means the developers can not devote their times solely to develop ( maintain ) the Free Pascal because they a "life" to pursue . In a commercial environment such a structure can not be used for a "life critical" component as used "programming language" , because there is no any alternative . Delphi can not be considered as an alternative due to reasons about their development and maintenance policies and it is also "monopoly" naturally because there is no any alternative SIMILAR compiler . I am using Free Pascal . I have abandoned Delphi , I did not buy a new version of it because it is for only a single operating system . Now , I will convert my program to C ( around 12 000 procedures ) where there is no any converter which can convert such a program . In that respect , I consider my program ( about data base programming language and interpreter ) as went into nearly scratch . Main reason is that in such a program generated code is correct but when an error is occurring it is not possible to its place or reason of it . Debugging tools are useless because they are very difficult to use . As a result , Pascal is a dead language , but a very useful and nice language to teach programming concepts . For small problems it is very good , but now , problem definitions started to become very complex . When a problem tends to be very large , Pascal is losing its power because of its non-standard ( actually related standards are dead and not maintained and not adhered ) structure . Mehmet Erol Sanliturk -------------- next part -------------- An HTML attachment was scrubbed... URL: From adearmas at gmail.com Thu Oct 13 15:37:53 2016 From: adearmas at gmail.com (Adrian De Armas) Date: Thu, 13 Oct 2016 10:37:53 -0300 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <0033ad35-491e-87fa-c287-b47070aca673@geldenhuys.co.uk> References: <0033ad35-491e-87fa-c287-b47070aca673@geldenhuys.co.uk> Message-ID: First of all, Thank you all who spent your time reading and suggesting about this subject. First, some clarifications. When I wrote "modern" my comparison was againts console applications. Even those students who won't do a line of code except in my class realize that console applications are not what they have been using since they approached to a computer. Introducing GUI is an efford to make the module more attractive to the students (the droupout rate is high). The module is taught as a basic science. All my students will be civil, environmental or bio engineers but not computer engineers. So I have two modules (Introduction to programming and advanced programming) to give them an idea of what programming is. My main focus now is "introduction to programming". It is a four-months course and given your advice, I will split the course in two months parts. First part will be all console applications where I will introduce the basics of pascal: - structure of a pascal program - variable declarations (integers, doubles, strings...) - read, readln, write, writeln - operations (+. -, *, /) - if, case, while, for, repeat/until - procedures and functions - algorithms like getting prime numbers, fibonacci series, etc The second part will introduce: - GUI environment. Dropping components on a form and arrange them. Changing properties. - Event oriented programming - simple and multidimensional arrays - ¿files? I will use some specific components to help the transition for example: var a, b, c: integer begin ...bla..bla... c=a+b; end; In GUI a, b, and c will be spinedits with a "value" integer property so I can write: spineditc.value := spinedita.value+spineditb.value; instead of editc.Text := IntToStr(StrToInt(Edita.Text)+StrToInt(Editb.Text)); Comboboxes and list control will be used in case statements with the "ItemIndex" property Memo.Lines and arrays will be given at the same time... etc... What do you think? Regards 2016-10-13 7:02 GMT-03:00 Graeme Geldenhuys via Lazarus < lazarus at lists.lazarus-ide.org>: > On 2016-10-13 10:04, Michael Schnell via Lazarus wrote: > > IMHO it's a shame, but new > > projects in Pascal seem to be declining, > > That's got nothing to do with the Object Pascal being modern or not (I > think it is modern enough). The decline is about marketing and > popularity contests, and management decisions (how easy is it to replace > a Object Pascal developers vs a Java developer). > > Delphi being sold every other year doesn't help with the stability of > Object Pascal in the marketplace either. > > Regards, > Graeme > > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mschnell at lumino.de Thu Oct 13 16:04:53 2016 From: mschnell at lumino.de (Michael Schnell) Date: Thu, 13 Oct 2016 16:04:53 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: <0033ad35-491e-87fa-c287-b47070aca673@geldenhuys.co.uk> Message-ID: <09fb42b0-2f69-6ba3-aedf-d73c6a244e6f@lumino.de> On 13.10.2016 15:32, Mehmet Erol Sanliturk via Lazarus wrote: > When a problem tends to be very large , Pascal is losing its power > because of its non-standard ( actually related standards are dead and > not maintained and not adhered ) structure . I do know several very large systems done in Delphi. The only real downside I see is that they are not portable to Linux and/or ARM. -Michael From kellingc at cox.net Thu Oct 13 16:18:33 2016 From: kellingc at cox.net (Chris Kelling) Date: Thu, 13 Oct 2016 14:18:33 +0000 (GMT) Subject: [Lazarus] Teaching Pascal at College Message-ID: <33ac3.1ccab.157be68ab79.Webtop.0@cox.net> Because there are some basic controls that use array logic (lists, combo boxes, even edit boxes when dealing with positions of characters in a string), I'd introduce the concept with the variables. If the student can make the connection between the visual controls and concept of array logic, the inserting, selecting, and manipulation of that data should be easy to grasp. Considering your audience, it should fit in with stuff they are already familiar with, just not thought of in the way of how a computer organizes memory? Meh, may be I'm getting too far down into the weeds. On Thu, Oct 13, 2016 at 9:37 AM, Adrian De Armas via Lazarus wrote: > First of all, > Thank you all who spent your time reading and suggesting about this > subject. > First, some clarifications. When I wrote "modern" my comparison was > againts > console applications. Even those students who won't do a line of code > except in my class realize that console applications are not what they > have > been using since they approached to a computer. > > Introducing GUI is an efford to make the module more attractive to the > students (the droupout rate is high). The module is taught as a basic > science. All my students will be civil, environmental or bio engineers > but > not computer engineers. So I have two modules (Introduction to > programming > and advanced programming) to give them an idea of what programming is. > > My main focus now is "introduction to programming". It is a > four-months > course and given your advice, I will split the course in two months > parts. > > First part will be all console applications where I will introduce the > basics of pascal: > > - structure of a pascal program > - variable declarations (integers, doubles, strings...) > - read, readln, write, writeln > - operations (+. -, *, /) > - if, case, while, for, repeat/until > - procedures and functions > - algorithms like getting prime numbers, fibonacci series, etc > > The second part will introduce: > > - GUI environment. Dropping components on a form and arrange them. > Changing properties. > - Event oriented programming > - simple and multidimensional arrays > - ¿files? > > I will use some specific components to help the transition for > example: > var > a, b, c: integer > begin > ...bla..bla... > c=a+b; > end; > > In GUI a, b, and c will be spinedits with a "value" integer property > so I > can write: > > spineditc.value := spinedita.value+spineditb.value; > > instead of > > editc.Text := IntToStr(StrToInt(Edita.Text)+StrToInt(Editb.Text)); > > Comboboxes and list control will be used in case statements with the > "ItemIndex" property > > Memo.Lines and arrays will be given at the same time... > etc... > > What do you think? > > > Regards > > > > > > > > > > > > 2016-10-13 7:02 GMT-03:00 Graeme Geldenhuys via Lazarus < > lazarus at lists.lazarus-ide.org>: > >> On 2016-10-13 10:04, Michael Schnell via Lazarus wrote: >>> IMHO it's a shame, but new >>> projects in Pascal seem to be declining, >> >> That's got nothing to do with the Object Pascal being modern or not >> (I >> think it is modern enough). The decline is about marketing and >> popularity contests, and management decisions (how easy is it to >> replace >> a Object Pascal developers vs a Java developer). >> >> Delphi being sold every other year doesn't help with the stability of >> Object Pascal in the marketplace either. >> >> Regards, >> Graeme >> >> -- >> _______________________________________________ >> Lazarus mailing list >> Lazarus at lists.lazarus-ide.org >> http://lists.lazarus-ide.org/listinfo/lazarus >> > > > ------------------------------ > > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus From mse00000 at gmail.com Thu Oct 13 16:27:44 2016 From: mse00000 at gmail.com (Martin Schreiber) Date: Thu, 13 Oct 2016 16:27:44 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: <0033ad35-491e-87fa-c287-b47070aca673@geldenhuys.co.uk> Message-ID: <201610131627.44788.mse00000@gmail.com> On Thursday 13 October 2016 15:37:53 Adrian De Armas via Lazarus wrote: [...] > > In GUI a, b, and c will be spinedits with a "value" integer property so I > can write: > > spineditc.value := spinedita.value+spineditb.value; > > instead of > > editc.Text := IntToStr(StrToInt(Edita.Text)+StrToInt(Editb.Text)); > In the mentioned "Programmieren macht Spass" text I tried to combine to discover the programming by "click and place" and learning the programming basics. Free Pascal and MSEgui are exceptionally well suited for the purpose. MSEgui provides TDataEdit descendants for the base types (TIntegerEdit, TRealEdit, TStringedit...) which all have an OnDataEntered event property which can be used to react on user data entries. An example from "Die Rechenkünstlerin" step2: " type tmainfo = class(tmainform) ergebnis: tintegerdisp; a: tintegeredit; b: tintegeredit; procedure dataentered(const sender: TObject); end; var mainfo: tmainfo; implementation uses main_mfm; procedure tmainfo.dataentered(const sender: TObject); begin ergebnis.value:= a.value + b.value; end; " The form looks like this: http://mseide-msegui.sourceforge.net/pics/rechenkunst2.png The end of the chapter: http://mseide-msegui.sourceforge.net/pics/rechenkunst.png ;-) Martin From tony.whyman at mccallumwhyman.com Thu Oct 13 16:23:39 2016 From: tony.whyman at mccallumwhyman.com (Tony Whyman) Date: Thu, 13 Oct 2016 15:23:39 +0100 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: <0033ad35-491e-87fa-c287-b47070aca673@geldenhuys.co.uk> Message-ID: On 13/10/16 14:37, Adrian De Armas via Lazarus wrote: > # GUI environment. Dropping components on a form and arrange them. > Changing properties. ># > Be careful to explain carefully the separate components that Lazarus brings together: The LCL The Compiler/Linker The Debugger The Text and Form Editors. Lazarus blends these together so seamlessly that programming novices often have difficulty understanding the difference between their program and the IDE. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mschnell at lumino.de Thu Oct 13 16:19:41 2016 From: mschnell at lumino.de (Michael Schnell) Date: Thu, 13 Oct 2016 16:19:41 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: <0033ad35-491e-87fa-c287-b47070aca673@geldenhuys.co.uk> Message-ID: On 13.10.2016 15:37, Adrian De Armas via Lazarus wrote: > > The second part will introduce: > > * GUI environment. Dropping components on a form and arrange them. > Changing properties. > Thanks to RAD, creating a GUI is extremely simple in Lazarus (any of the students you described can learn to create a simple GUI in just some minutes). It's a lot more fun to test your code in the GUI you created yourself. So I would begin the lessons with "creating a simple GUI". Here you would teach to create a program ("application" in Lazarus speak) that shows a Button. No code at all needs to be written and you can start it and happily see your GUI. Then doubleclick the button in the GUI designer and Lazarus will write (and install) an event handler function for you. Now you can do your first line of code: Caption := 'Hello World'; (You even don't need to write Caption := as Lazarus autocompletes the code if desired.) Now press F9 and Lazarus compiles and starts your program and you can click the Button and see the result. I thinks this start will make the students most happy, as they are rewarded by instant success. -Michael -------------- next part -------------- An HTML attachment was scrubbed... URL: From mse00000 at gmail.com Thu Oct 13 16:37:24 2016 From: mse00000 at gmail.com (Martin Schreiber) Date: Thu, 13 Oct 2016 16:37:24 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <201610131627.44788.mse00000@gmail.com> References: <201610131627.44788.mse00000@gmail.com> Message-ID: <201610131637.25137.mse00000@gmail.com> On Thursday 13 October 2016 16:27:44 Martin Schreiber wrote: A better screenshot who shows what the binary value displays do: http://mseide-msegui.sourceforge.net/pics/rechenkunst.png Martin From reimgrab at web.de Thu Oct 13 16:48:03 2016 From: reimgrab at web.de (Reimar Grabowski) Date: Thu, 13 Oct 2016 16:48:03 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: <0033ad35-491e-87fa-c287-b47070aca673@geldenhuys.co.uk> Message-ID: <20161013164803.7c976459@darkbreed> On Thu, 13 Oct 2016 10:37:53 -0300 Adrian De Armas via Lazarus wrote: > Introducing GUI is an efford to make the module more attractive to the > students (the droupout rate is high). The module is taught as a basic > science. All my students will be civil, environmental or bio engineers but > not computer engineers. And nonetheless you think replacing matlab with pascal (or any other language) is a good idea? If you just want a GUI to make it more fancy matlab can provide that, too. If you want modern, teach them Java and let the programs run on their phones or keep doing console programs and do the GUI in JS (aka web applications). ^^ R. From m.e.sanliturk at gmail.com Thu Oct 13 17:09:48 2016 From: m.e.sanliturk at gmail.com (Mehmet Erol Sanliturk) Date: Thu, 13 Oct 2016 08:09:48 -0700 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <09fb42b0-2f69-6ba3-aedf-d73c6a244e6f@lumino.de> References: <0033ad35-491e-87fa-c287-b47070aca673@geldenhuys.co.uk> <09fb42b0-2f69-6ba3-aedf-d73c6a244e6f@lumino.de> Message-ID: On Thu, Oct 13, 2016 at 7:04 AM, Michael Schnell via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > On 13.10.2016 15:32, Mehmet Erol Sanliturk via Lazarus wrote: > >> When a problem tends to be very large , Pascal is losing its power >> because of its non-standard ( actually related standards are dead and not >> maintained and not adhered ) structure . >> > I do know several very large systems done in Delphi. The only real > downside I see is that they are not portable to Linux and/or ARM. > > -Michael > -- > _______________________________________________ > This is the real problem as you said : Portability among different operating systems . As an example : All of the super computers are using Linux ( there are very few exceptions being the smallest super computers in "500 super computers list" using Windows ) . Development in Delphi is no use in that environment . Mehmet Erol Sanliturk -------------- next part -------------- An HTML attachment was scrubbed... URL: From zoe at scootersoftware.com Thu Oct 13 18:13:08 2016 From: zoe at scootersoftware.com (=?UTF-8?Q?Zo=c3=ab_Peterson?=) Date: Thu, 13 Oct 2016 11:13:08 -0500 Subject: [Lazarus] LCL Cocoa: Overriding delegate protocols Message-ID: <13f14f85-4056-210f-fbaa-f898daa176ff@scootersoftware.com> I need to handle some delegate protocols in our application layer, which will require overriding things that the LCL Cocoa layer already implements in classes like TCocoaWindow. In the Carbon interface, the equivalent was fairly easy, since TCarbonWSCustomForm.CreateHandle just creates a TCarbonWindow and passes it back, so it's trivial to implement a new CreateHandle that returns my descendant. TCocoaWSCustomForm.CreateHandle, on the other hand, creates a TCocoaWindow and then does a bunch of extra work to set that window up. I'd really rather not duplicate the entirety of TCocoaWS*.CreateHandle, especially since the interface is still immature. It seems like the fix would be to move all of the CreateHandle code into a method in TCocoaWindow (possibly init), and if that's the case, we can certainly look into a patch to do that, but I'd like some direction from the devs first. Thanks, Zoë Peterson Scooter Software From mailinglists at collins-email.co.uk Thu Oct 13 22:13:49 2016 From: mailinglists at collins-email.co.uk (Martin Collins) Date: Thu, 13 Oct 2016 21:13:49 +0100 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> Message-ID: <1b6cb5e4-5a39-5252-07f9-387f301acd19@collins-email.co.uk> Darn it, sounds like Graeme is describing me! I wandered into Lazarus/Free Pascal a few years ago after enjoying writing VBA code in Excel. Admittedly I always found my (VBA) code sloppy and wrote some odd code just to make things work! My coding is just a hobby that I enjoy, but I would like to be able to do it well and also somehow know that I am. Unfortunately I come from a marine (ships) background not from an IT one. No formal training in programming. I'm a lonely Linux user and an even more lonely pascal coder, so I only have this mailinglist to "litmus test" my "skills" against. Sometimes I feel like I'm being a pain but no one has yet been rude to me, just helpful which I appreciate ;-) When I see a recommendation from someone on this list, I normally go for it. Therefore just ordered a copy of An Introduction To Methodical Programming, thanks Tony. I am envious of the students of Adrian De Armas who will receive some formal training. I have a lot of books on pascal programming, pascal manuals (turbo 5.5), even Kylix & Delphi 3 tomes including Lazarus The Complete Guide that all threaten to break my shelves at any moment. All these books have been a great help to me, but out of interest what would the IT graduates on this mailing list recommend as the best reference publication for teaching a) programming concepts in general, & b) pascal programming specifically? Thanks, Martin On 13/10/16 09:20, Graeme Geldenhuys via Lazarus wrote: > > .............................................. We don't want another > whole generation of Visual Basic programmers. The Visual Basic 4-6 > programs I had seen and unfortunately had to maintain were the sloppiest > code I've ever seen - all written by "programmers" that dived straight > into VB with no prior programming experience. > > > Regards, > Graeme > From giuliano.colla at fastwebnet.it Thu Oct 13 23:11:31 2016 From: giuliano.colla at fastwebnet.it (Giuliano Colla) Date: Thu, 13 Oct 2016 23:11:31 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <20161013164803.7c976459@darkbreed> References: <0033ad35-491e-87fa-c287-b47070aca673@geldenhuys.co.uk> <20161013164803.7c976459@darkbreed> Message-ID: <1abaf000-7808-74fa-31f6-cb09d678d4c6@fastwebnet.it> Il 13/10/2016 16:48, Reimar Grabowski via Lazarus ha scritto: > If you want modern, teach them Java and let the programs run on their phones or keep doing console programs and do the GUI in JS (aka web applications). ^^ I find very unlikely that civil, environmental and bio engineers will find of any use learning how to write program for their phones, or for developing web applications. On the contrary they may need to develop typical computer applications, where a traditional programming language provides the required efficiency, and RAD can be very important bonus, to get it quickly done. I have always found that following no matter what the most "modern" technology is totally wrong and misleading. One should be aware of what is available, of course, but then one should always select the most "appropriate" technology, and not be influenced by what is "modern". Tombstones are still made of stone, a stone age technology, just because it still turns out to be the most appropriate technology to cover a grave. Giuliano From mailinglists at geldenhuys.co.uk Thu Oct 13 23:45:16 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 13 Oct 2016 22:45:16 +0100 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <1b6cb5e4-5a39-5252-07f9-387f301acd19@collins-email.co.uk> References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <1b6cb5e4-5a39-5252-07f9-387f301acd19@collins-email.co.uk> Message-ID: On 2016-10-13 21:13, Martin Collins via Lazarus wrote: > My coding is just a hobby that I enjoy, but I would like to be able to > do it well and also somehow know that I am. Unfortunately I come from a > marine (ships) background not from an IT one. No formal training in > programming. You background doesn't matter. Many have found there way into programming from whatever they did before. Formal training is also not a requirement for becoming a good or even excellent programming. I know many excellent self-taught programmers. Most things programmers do are all self-taught anyway. Formal training just plants the seed. From what you described (your willingness to learn by reading various programming books), it seems you are well on your way to become a better programmer. You should give yourself more credit. :-) > on this mailing list recommend as the best reference publication for > teaching a) programming concepts in general, & b) pascal programming > specifically? With the availability of the Internet, there are tons of useful information out there - all for free. You just need the willingness to read, learn and practice. My biggest leap in improving my programming skills was when I started studying Design Patterns. 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 Thu Oct 13 23:47:25 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Thu, 13 Oct 2016 22:47:25 +0100 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <1abaf000-7808-74fa-31f6-cb09d678d4c6@fastwebnet.it> References: <0033ad35-491e-87fa-c287-b47070aca673@geldenhuys.co.uk> <20161013164803.7c976459@darkbreed> <1abaf000-7808-74fa-31f6-cb09d678d4c6@fastwebnet.it> Message-ID: <11385b8a-94db-ee04-04db-7bb19e721dae@geldenhuys.co.uk> On 2016-10-13 22:11, Giuliano Colla via Lazarus wrote: > One should be aware of what > is available, of course, but then one should always select the most > "appropriate" technology, and not be influenced by what is "modern". Very wise words! Regards, Graeme From erwin at deseine.nl Fri Oct 14 00:13:58 2016 From: erwin at deseine.nl (Erwin van den Bosch) Date: Fri, 14 Oct 2016 00:13:58 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: Message-ID: Although I use Free Pascal/Lazarus a lot (because we have a lot of existing pascal code) I think C++ and some GUI framework like QT might be a better option. C/C++ is the number one used programming language. C/C++ code is much more portable to other systems. There are more compilers. QT has a very nice IDE (QT Creator) and is available for Windows, Mac and Linux. Nobody is using Pascal these days. So why learn it? I'm not a big fan of the RAD development way any more. (I was years ago). The problem is that you should separate your business logic and the GUI. With Delphi like RAD it's very difficult to do that. (but it is possible) Everything is coded in events and connected to database aware GUI controls. (In the case of a database application) Another problem with the RAD way is that a lot is stored in forms (.lfm files) and it's difficult to see/notice changes to those files. They can be very big and it's difficult to see if some control is missing, for example, an event or so. The Lazarus IDE does frequently change the properties of controls on the form. For example the width and the height properties frequently change with no reason as it seems. As specially when you do development on both Windows and Linux. That makes tracking code changes (and so potential new bugs) not very easy. Regards, Erwin Op 12-10-2016 om 20:10 schreef Adrian De Armas via Lazarus: > Hello everyone, > I am a professor of "introduction to programming". Currently we are > working with matlab and c. > > Today I had a meeting about doing the module more interesting to the > students. Currently we teach algorithms making console applications > and usually I receive questions like "Why don't we do something more > modern?". > > I recommended that we should use Pascal in General and Lazarus in > particular to teach how to create rich GUI Applications and to my > surprise the idea was well recieved. Now I have to make suggestions > about how to prepare the module starting from zero. Students do not > know how to program and I need to include subjects as: variable > declaration, operations, if, while, for, functions and procedure, > arrays and multidimensional arrays. > > I would love to know what you think about making the transition from > console to GUI. > This is an exciting opportunity I'd love to make it right. > > Regards > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From luizamericop at gmail.com Fri Oct 14 00:18:17 2016 From: luizamericop at gmail.com (Luiz Americo Pereira Camara) Date: Thu, 13 Oct 2016 19:18:17 -0300 Subject: [Lazarus] Most efficient way for polling (TTimer, OnIdle, TIdleTimer, TThread) Message-ID: I have a component that needs to poll a SimpleIPC server repeatedly (at each 1s or so). Currently i'm using a TTimer with a OnTimer handler that calls FIPCServer.PeekMessage(1, True);. Wondering if using TIdleTimer, Application.OnIdle(or AddIdleHandler) or a separated TThread will be more efficient. By efficiency i mean low resource usage, notebook battery friendly Luiz -------------- next part -------------- An HTML attachment was scrubbed... URL: From doug at moosemail.net Fri Oct 14 03:14:49 2016 From: doug at moosemail.net (DougC) Date: Thu, 13 Oct 2016 21:14:49 -0400 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: Message-ID: <157c0c18153.ddd80967203898.1568034745529216486@moosemail.net> ---- On Thu, 13 Oct 2016 18:13:58 -0400Erwin van den Bosch via Lazarus <lazarus at lists.lazarus-ide.org> wrote ---- Although I use Free Pascal/Lazarus a lot (because we have a lot of existing pascal code) I think C++ and some GUI framework like QT might be a better option. C/C++ is the number one used programming language. C/C++ code is much more portable to other systems. There are more compilers. QT has a very nice IDE (QT Creator) and is available for Windows, Mac and Linux. Nobody is using Pascal these days. So why learn it? Learn Object Pascal early instead of C/C++ because it is simpler and better designed. It therefore allows the students to focus on the content of what they are building and not the extraneous details/dangers of the language. This is why Pascal was the standard language for advanced placement courses for several decades before the academic establishment gave in to market forces. -------------- next part -------------- An HTML attachment was scrubbed... URL: From list2010 at BrenemanLabs.com Fri Oct 14 04:12:02 2016 From: list2010 at BrenemanLabs.com (Paul Breneman) Date: Thu, 13 Oct 2016 21:12:02 -0500 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: Message-ID: <93848239-9814-cefb-efe9-da96f3d84587@BrenemanLabs.com> On 10/13/2016 05:13 PM, Erwin van den Bosch via Lazarus wrote: ... > Another problem with the RAD way is that a lot is stored in forms (.lfm > files) and it's difficult to see/notice changes to those files. They can > be very big and it's difficult to see if some control is missing, for > example, an event or so. The Lazarus IDE does frequently change the > properties of controls on the form. For example the width and the height > properties frequently change with no reason as it seems. As specially > when you do development on both Windows and Linux. That makes tracking > code changes (and so potential new bugs) not very easy. > > Regards, > Erwin I've used Beyond Compare since (about) 1995 to always compare my form files. Here is a related topic: Cleaning up the Delphi uses statements http://brenemanlabs.com/Uses.htm Regards, Paul www.ControlPascal.com From lacak at zoznam.sk Fri Oct 14 07:43:46 2016 From: lacak at zoznam.sk (LacaK) Date: Fri, 14 Oct 2016 07:43:46 +0200 Subject: [Lazarus] TDBEdit, TStringField Size, DataSize, DisplayWidth and MaxLength In-Reply-To: <53409657-ab40-a37f-db11-2f42f3e62582@mccallumwhyman.com> References: <035d4254-63a5-95f2-05a3-4fdd2136c9c0@mccallumwhyman.com> <5346d810-7d86-454d-f514-90b62610499a@zoznam.sk> <401a8d0d-47a2-92d8-d38c-b06e372aefbf@mccallumwhyman.com> <53409657-ab40-a37f-db11-2f42f3e62582@mccallumwhyman.com> Message-ID: <5f8f8de7-eaa5-e177-3a72-bda14be60276@zoznam.sk> > >> I am aware of it. I have not added all other MBCS because ! I doubt, >> which are realy used nowadays. >> My guess is that UTF-8 is far most used / supported as client >> character set. >> No problem to add them if there will be real demand from users ... > Perhaps the correct answer is to let the database driver work this one > out rather than have a fixed decision in the FCL. > > I would suggest the following change: > > function TStringField.GetDataSize: Integer; My intention was made TStringField independent from TFieldDef, at least because we can have FieldDef=nil (for lookup, calculated fields) Of course I can introduce class procedure (or regular procedure), with ACodePage parameter, which will be called from TStringField and TFieldDef, so all code will be in one place. > > > In IBX, I have already done this using TIBFieldDef and TIBStringField > as subclasses in order to pass character set information. However, > because TFieldDef.CreateField is non-virtual, the implementation is > not as elegant as it should be. That is the extra info is added to the > TIBStringField as the dataset is opened I do not know IBX, but don't you use overriden TDataSet.InternalInitFieldDefs ? It will allow you put extra info into FieldDef and then use overriden TDataSet.CreateFields, which will allow you pass extra info from TIBFieldDef into TIBStringField for example ... (AFAICS Zeos do it in this way also) -Laco. > rather than when the field is created. It is also less maintainable as > the functionality should be in TIBFieldDef rather than in a different > class altogether. > > Making those two methods virtual is the most important change. I can > live with TStringField.GetDataSize as it is because that is already > virtual and a future TIBStringField can readily override it. > > Tony Whyman > MWA > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.e.sanliturk at gmail.com Fri Oct 14 08:28:32 2016 From: m.e.sanliturk at gmail.com (Mehmet Erol Sanliturk) Date: Thu, 13 Oct 2016 23:28:32 -0700 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: Message-ID: On Thu, Oct 13, 2016 at 3:13 PM, Erwin van den Bosch via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > Although I use Free Pascal/Lazarus a lot (because we have a lot of > existing pascal code) I think C++ and some GUI framework like QT might be a > better option. C/C++ is the number one used programming language. C/C++ > code is much more portable to other systems. There are more compilers. QT > has a very nice IDE (QT Creator) and is available for Windows, Mac and > Linux. Nobody is using Pascal these days. So why learn it? > > I'm not a big fan of the RAD development way any more. (I was years ago). > The problem is that you should separate your business logic and the GUI. > With Delphi like RAD it's very difficult to do that. (but it is possible) > Everything is coded in events and connected to database aware GUI controls. > (In the case of a database application) > Another problem with the RAD way is that a lot is stored in forms (.lfm > files) and it's difficult to see/notice changes to those files. They can be > very big and it's difficult to see if some control is missing, for example, > an event or so. The Lazarus IDE does frequently change the properties of > controls on the form. For example the width and the height properties > frequently change with no reason as it seems. As specially when you do > development on both Windows and Linux. That makes tracking code changes > (and so potential new bugs) not very easy. > > Regards, > Erwin > I consider QT a very big trap . Please be careful about its license if you want to develop commercial software and also if you want to teach computer programming to the students that they will work for commercial companies . I am seeing many student projects in , especially , Github , which I consider a total disaster for the students because over time , when they start as a worker in a commercial company , they will not be able to use their knowledge if the company does not buy a commercial license from QT owner . Trap is the following : QT is using LGPLv2 license in some parts . This seems to be a good choice , BUT , the same sources are using in some parts LGPLv3 ( Three ) license . Since software is developed or contributions accepted by QT owner , this LGPLv3 license is NOT compulsory , means they can have it LGPLv2 license . Really , I consider GPLv3/LGPLv3 licenses not suitable for a service to humanity as a whole because they are very hostile to commercial companies . If any LGPLv3 part is used , is only a disaster for all of the other software . In QT , this fact is a seemingly hidden trap . I am not a commercial person . I am a retiree of the Government of Turkey from a State University . I have attempted to a business to produce furniture , it turned to be a disaster . I decided that business activities is not for me . I am trying to produce software to supply it to market just to obtain money at least to support its maintenance . If more money , there may be possibility to produce more software . I know that software development is an extremely costly process . To try to enforce commercial companies to make their software open source unconditionally , really it is not a friendly action . Or trying to entrap into a situation that they will be enforced to buy a software by tricking them in any way . It is not my business to discuss the issues about QT , but it is necessary to be at least friendly to the people . My trouble is that point . To expect that everyone ( especially students ) will know details of the licenses and their legal consequences is not very realistic . Here , main responsibility lies on the schools and their instructors . A huge number of student projects ( in order of many ten thousands ) even does not contain any single sentence about their license . With this structure , no one of the students in job search can use their projects to show their achievements because most of the project copyrights are belong to their universities . When a software does not contain any explicit license about what can be done with it , its rule is with respect to copyright laws : You can NOT touch to this ! So simply . Since I have mentioned the above issue about student projects , I want to also mention the following disastrous issue about them : Quality of projects is so low that ( even in best universities of the world ) , the only my feeling was a big disappointment and sorrow . It is not necessary to each everything listed in a manual of a programming language , but teach a subset that , at least the student can write a program which can be used in a production environment with its inherent quality . It is not important of its size also , but its quality . Quality of software is the most important feature . Use knowledge found in "Software Engineering" books in a way that it can be used even in an introductory course . A starting point may be https://en.wikipedia.org/wiki/Software_development_process Instead of writing fifty useless programs , allow the student to write five quality programs written in such a way that it can be used in a commercial product with its full development steps defined in the above page ( including its copyright and license information ). This point should also be considered with respect to size of software : Perhaps small , but in sufficient quality . Thank you very much . Mehmet Erol Sanliturk > > Op 12-10-2016 om 20:10 schreef Adrian De Armas via Lazarus: > > Hello everyone, > I am a professor of "introduction to programming". Currently we are > working with matlab and c. > > Today I had a meeting about doing the module more interesting to the > students. Currently we teach algorithms making console applications and > usually I receive questions like "Why don't we do something more modern?". > > I recommended that we should use Pascal in General and Lazarus in > particular to teach how to create rich GUI Applications and to my surprise > the idea was well recieved. Now I have to make suggestions about how to > prepare the module starting from zero. Students do not know how to program > and I need to include subjects as: variable declaration, operations, if, > while, for, functions and procedure, arrays and multidimensional arrays. > > I would love to know what you think about making the transition from > console to GUI. > This is an exciting opportunity I'd love to make it right. > > Regards > > > > > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zeljko at holobit.net Fri Oct 14 08:51:52 2016 From: zeljko at holobit.net (zeljko) Date: Fri, 14 Oct 2016 08:51:52 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: Message-ID: <72644a68-16f9-c4b9-a911-23af47d21e40@holobit.net> On 10/14/2016 08:28 AM, Mehmet Erol Sanliturk via Lazarus wrote: > I consider QT a very big trap . Please be careful about its license if > you want to develop commercial software and also if you want to teach > computer programming to the students that they will work for commercial > companies . > > > I am seeing many student projects in , especially , Github , which I > consider a total disaster for the students because over time , when they > start as a worker in a commercial company , they will not be able to use > their knowledge if the company does not buy a commercial license from QT > owner . > > > Trap is the following : QT is using LGPLv2 license in some parts . This > seems to be a good choice , BUT , the same sources are using in some > parts LGPLv3 ( Three ) license . Since software is developed or > contributions accepted by QT owner , this LGPLv3 license is NOT > compulsory , means they can have it LGPLv2 license . Really , I > consider GPLv3/LGPLv3 licenses not suitable for a service to humanity as > a whole because they are very hostile to commercial companies . If any > LGPLv3 part is used , is only a disaster for all of the other software . > In QT , this fact is a seemingly hidden trap . AFAIK, LGPLv3 is applied only to Qt extra modules (like QVirtualKeyboard etc), but not to the core lib which is LGPLv2, and we are using core/gui lib only for lazarus, so no problems with commercial usage. zeljko From tony.whyman at mccallumwhyman.com Fri Oct 14 10:08:40 2016 From: tony.whyman at mccallumwhyman.com (Tony Whyman) Date: Fri, 14 Oct 2016 09:08:40 +0100 Subject: [Lazarus] TDBEdit, TStringField Size, DataSize, DisplayWidth and MaxLength In-Reply-To: <5f8f8de7-eaa5-e177-3a72-bda14be60276@zoznam.sk> References: <035d4254-63a5-95f2-05a3-4fdd2136c9c0@mccallumwhyman.com> <5346d810-7d86-454d-f514-90b62610499a@zoznam.sk> <401a8d0d-47a2-92d8-d38c-b06e372aefbf@mccallumwhyman.com> <53409657-ab40-a37f-db11-2f42f3e62582@mccallumwhyman.com> <5f8f8de7-eaa5-e177-3a72-bda14be60276@zoznam.sk> Message-ID: On 14/10/16 06:43, LacaK via Lazarus wrote: > I do not know IBX, but don't you use overriden > TDataSet.InternalInitFieldDefs ? It will allow you put extra info into > FieldDef and then use overriden TDataSet.CreateFields, which will > allow you pass extra info from TIBFieldDef into TIBStringField for > example ... > (AFAICS Zeos do it in this way also) That is basically what IBX does. My point is that it would be better to put the passing of the extra info into a subclassed TFieldDef rather than have it in TIBCustomDataSet. After all, isn't the whole point of OO programming to group related functionality into the same class. If you recommend subclassing the TFieldDef then surely it makes sense to make CreateField a virtual method. From mschnell at lumino.de Fri Oct 14 10:13:13 2016 From: mschnell at lumino.de (Michael Schnell) Date: Fri, 14 Oct 2016 10:13:13 +0200 Subject: [Lazarus] Most efficient way for polling (TTimer, OnIdle, TIdleTimer, TThread) In-Reply-To: References: Message-ID: On 14.10.2016 00:18, Luiz Americo Pereira Camara via Lazarus wrote: > I have a component that needs to poll a SimpleIPC server repeatedly > (at each 1s or so). While I do think that polling once a second will not do any noticeable harm, a better design might be to push some kind of message from the other site and wait for same in a function that does an appropriate OS call. (E.g a TThread doing a blocking wait for a pipe and then using TThread.Queue to call an event handler function in the main thread.) -Michael From mschnell at lumino.de Fri Oct 14 10:18:06 2016 From: mschnell at lumino.de (Michael Schnell) Date: Fri, 14 Oct 2016 10:18:06 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> Message-ID: On 13.10.2016 10:20, Graeme Geldenhuys via Lazarus wrote: > +1 > That would be the best solution. GUI programming is based on > fundamentals than need to be understood first. -1 !! The OP explained that his main purpose is to introduce more fun in the education. That can be done by plunging into programming directly with GUI development. This is why RAD had been invented. Of course there are decent drawbacks regarding relying too much on RAD and about not really understanding the fundamentals behind it. But in the end the addressees are non-computer engineers. -Michael From lacak at zoznam.sk Fri Oct 14 10:29:20 2016 From: lacak at zoznam.sk (LacaK) Date: Fri, 14 Oct 2016 10:29:20 +0200 Subject: [Lazarus] TDBEdit, TStringField Size, DataSize, DisplayWidth and MaxLength In-Reply-To: References: <035d4254-63a5-95f2-05a3-4fdd2136c9c0@mccallumwhyman.com> <5346d810-7d86-454d-f514-90b62610499a@zoznam.sk> <401a8d0d-47a2-92d8-d38c-b06e372aefbf@mccallumwhyman.com> <53409657-ab40-a37f-db11-2f42f3e62582@mccallumwhyman.com> <5f8f8de7-eaa5-e177-3a72-bda14be60276@zoznam.sk> Message-ID: <10cfe97f-5d55-362e-a0d1-eadc30823eff@zoznam.sk> Dňa 14.10.2016 o 10:08 Tony Whyman via Lazarus napísal(a): > > On 14/10/16 06:43, LacaK via Lazarus wrote: >> I do not know IBX, but don't you use overriden >> TDataSet.InternalInitFieldDefs ? It will allow you put extra info >> into FieldDef and then use overriden TDataSet.CreateFields, which >> will allow you pass extra info from TIBFieldDef into TIBStringField >> for example ... >> (AFAICS Zeos do it in this way also) > That is basically what IBX does. Not only IBX I think ;-) I suppose that all TDataSet descendants must follow this, because in Delphi is TFieldDef.CreateField also not virtual. Probably there is logic, why it is designed as is (may be CreateFields/BindFields should care about TFieldDef->TField). > My point is that it would be better to put the passing of the extra > info into a subclassed TFieldDef rather than have it in TIBCustomDataSet. I understand, but I think, that you must care also about persistent fields, where you must hook into BindFields (in all cases there are only 3 lines of code in CreateFields which iteratte over FieldDefs and create field so IMO no big problem override it) -Laco. From mschnell at lumino.de Fri Oct 14 10:50:28 2016 From: mschnell at lumino.de (Michael Schnell) Date: Fri, 14 Oct 2016 10:50:28 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: Message-ID: <0a969b04-5962-64f1-fd28-102053bf1eb1@lumino.de> On 14.10.2016 00:13, Erwin van den Bosch via Lazarus wrote: > > I'm not a big fan of the RAD development way any more. (I was years > ago). The problem is that you should separate your business logic and > the GUI. This is absolutely true especially when doing large systems or (embedded) systems that don't are tightly bundled with the GUI. But even there using RAD for testing/debugging is a way for speed up the development. And here the addressees are non-computer engineers who most likely will not do large systems on their own, but just should understand what programming means to enable them to talk decently with their colleagues who will do the programming for appropriate projects. So a fast way ("RAD") to do and test a rather simple working project and understand the basics > With Delphi like RAD it's very difficult to do that. (but it is > possible) Everything is coded in events and connected to database > aware GUI controls. (In the case of a database application) I don't think so. With a more careful design it's absolutely possible to do "non RAD" programs by doing "GUI units" and "business code Units" that interact via Objects with functions, properties and events (callback-properties) . I believe this is not more effort that using an external GUI designer. I did this for embedded projects using the GUI units for debugging and testing and then replacing them by dummies without needing to modify the business code units and hence being able to start testing again at any time, while the "GUI-stripped" executable can used on a "headless" target system -Michael From markMLl.lazarus at telemetry.co.uk Fri Oct 14 11:06:51 2016 From: markMLl.lazarus at telemetry.co.uk (Mark Morgan Lloyd) Date: Fri, 14 Oct 2016 09:06:51 +0000 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> Message-ID: On 14/10/16 08:30, Michael Schnell via Lazarus wrote: > Of course there are decent drawbacks regarding relying too much on RAD > and about not really understanding the fundamentals behind it. > But in the end the addressees are non-computer engineers. Seconded. If I could make a general observation: when teaching/supporting Pascal-style languages I've found it useful to completely decouple pointers, records and dynamic memory, irrespective of the fact that most books lump them in together by talking about linked lists and trees. Records are a useful general-purpose way of organising data. Pointers are something that refer to e.g. a block of known format returned by the operating system, but are used much less in OO systems than they used to be. Only after those are understood should dynamic memory be introduced, if ever. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] From dec12 at avidsoft.com.hk Fri Oct 14 11:10:38 2016 From: dec12 at avidsoft.com.hk (Dennis) Date: Fri, 14 Oct 2016 17:10:38 +0800 Subject: [Lazarus] Windows 10 force any non-white background color to White Message-ID: <5800A10E.9090207@avidsoft.com.hk> I have a program written in lazarus running normally in windows 7. When run in windows 10, the green color of the Frame/Form is changed by Windows 10 to white. Now my customer is complaining the bright white is hurting his eyes. Can anyone help? I googled and the only articles is about changing the title bar color, not the form's color. Dennis -------------- next part -------------- An HTML attachment was scrubbed... URL: From giuliano.colla at fastwebnet.it Fri Oct 14 12:01:09 2016 From: giuliano.colla at fastwebnet.it (Giuliano Colla) Date: Fri, 14 Oct 2016 12:01:09 +0200 Subject: [Lazarus] Windows 10 force any non-white background color to White In-Reply-To: <5800A10E.9090207@avidsoft.com.hk> References: <5800A10E.9090207@avidsoft.com.hk> Message-ID: <879dffda-751f-974c-f0c4-a1a10e6f131e@fastwebnet.it> Il 14/10/2016 11:10, Dennis via Lazarus ha scritto: > I have a program written in lazarus running normally in windows 7. > When run in windows 10, the green color of the Frame/Form is changed > by Windows 10 to white. My best suggestion is to encourage your customer to downgrade to Windows 7. Hewlett Packard, when you select a professional grade laptop or desktop, as of today is still providing Windows 7 professional preinstalled, and includes an upgrade DVD to Windows 10, which you may decide to use, but at your own risk. They know better! Giuliano -------------- next part -------------- An HTML attachment was scrubbed... URL: From tc at epidata.info Fri Oct 14 12:16:25 2016 From: tc at epidata.info (Torsten Bonde Christiansen) Date: Fri, 14 Oct 2016 12:16:25 +0200 Subject: [Lazarus] TPageControl cannot change parent Message-ID: <606c0198-3922-e656-2492-7cbc7b11784c@epidata.info> Hi List. In the designer it is not posible to use the builtin feature of "Change Parent" (from the context menu) with a TPageControl. Other controls seems to work fine (although i have not tested all of them). To recreate the problem slap a TPanel and a TPageControl on the mainform and add a single tabsheet. Use "Change Parent" on the Pagecontrol and change it to the panel - and bang. I use: Lazarus trunk: r53105 Fpc: 3.0.0 (release) x86_64 Lazarus does a hard crash - even the stack-trace is halted: torsten at Rainier:~/FreePascal/lazarus$ ./startlazarus is a file TLazarusManager.Run starting /home/torsten/FreePascal/lazarus/lazarus ... Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] PrimaryConfigPath="/home/torsten/.lazarus" Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] SecondaryConfigPath="/etc/lazarus" Hint: (lazarus) [TBuildManager.SetBuildTarget] Old=x86_64-linux-gtk2 New=x86_64-linux-gtk2 FPC=True LCL=False TComponentTreeView.SetSelection: Updating component node values. AddComponent TPanel Parent=Form1:TForm1 23,15,269,625 Parent is 'Form1:TForm1' Hint: (lazarus) [TPkgManager.AddUnitDependenciesForComponentClasses] Extending Uses unit1.pas ExtCtrls AddComponent TPageControl Parent=Form1:TForm1 326,26,470,604 Parent is 'Form1:TForm1' Hint: (lazarus) [TPkgManager.AddUnitDependenciesForComponentClasses] Extending Uses unit1.pas ComCtrls TComponentTreeView.SetSelection: Selection.ForceUpdate encountered. TComponentTreeView.SetSelection: Selection.ForceUpdate encountered. TApplication.HandleException Access violation Stack trace: $00007FE443665D86 This is as far as it goes. On a side node - it IS posible to select a tabsheet and change the parent to the panel, which IMO should not be posible. Kind regards Torsten -------------- next part -------------- An HTML attachment was scrubbed... URL: From shokwave at gmx.net Fri Oct 14 12:29:45 2016 From: shokwave at gmx.net (shoKwave) Date: Fri, 14 Oct 2016 12:29:45 +0200 Subject: [Lazarus] Windows 10 force any non-white background color to White In-Reply-To: <5800A10E.9090207@avidsoft.com.hk> References: <5800A10E.9090207@avidsoft.com.hk> Message-ID: <1ab876d8-97cb-ac6a-26bc-c7edbc432ab0@gmx.net> Am 14.10.2016 um 11:10 schrieb Dennis via Lazarus: > I have a program written in lazarus running normally in windows 7. > When run in windows 10, the green color of the Frame/Form is changed > by Windows 10 to white. > Hi, I can't confirm that for Windows 10 1610 32bit with Lazarus 1.6/ FPC 3.0 and Lazarus/FPC Trunk. Form shows colour correctly (see pic) and frame seems to be transparent. Ingo -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 2989 bytes Desc: not available URL: From shokwave at gmx.net Fri Oct 14 12:32:57 2016 From: shokwave at gmx.net (shoKwave) Date: Fri, 14 Oct 2016 12:32:57 +0200 Subject: [Lazarus] Windows 10 force any non-white background color to White In-Reply-To: <5800A10E.9090207@avidsoft.com.hk> References: <5800A10E.9090207@avidsoft.com.hk> Message-ID: <128fbef0-41a7-425b-d7a9-51edab7ad3fb@gmx.net> Am 14.10.2016 um 11:10 schrieb Dennis via Lazarus: > Can anyone help? I googled and the only articles is about changing the > title bar color, not the form's color. > > Dennis > > Maybe a TPanel can help. Ingo -------------- next part -------------- An HTML attachment was scrubbed... URL: From mailinglists at geldenhuys.co.uk Fri Oct 14 12:41:30 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Fri, 14 Oct 2016 11:41:30 +0100 Subject: [Lazarus] Windows 10 force any non-white background color to White In-Reply-To: <879dffda-751f-974c-f0c4-a1a10e6f131e@fastwebnet.it> References: <5800A10E.9090207@avidsoft.com.hk> <879dffda-751f-974c-f0c4-a1a10e6f131e@fastwebnet.it> Message-ID: <88bb3490-2675-d15b-6649-75e36fdbd1f9@geldenhuys.co.uk> On 2016-10-14 11:01, Giuliano Colla via Lazarus wrote: > My best suggestion is to encourage your customer to downgrade to Windows 7. Yeah right - that will never happen! All that effort just for one application, because LCL doesn't support the most basic of theming. Regards, Graeme From m.e.sanliturk at gmail.com Fri Oct 14 12:42:08 2016 From: m.e.sanliturk at gmail.com (Mehmet Erol Sanliturk) Date: Fri, 14 Oct 2016 03:42:08 -0700 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> Message-ID: On Fri, Oct 14, 2016 at 1:18 AM, Michael Schnell via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > On 13.10.2016 10:20, Graeme Geldenhuys via Lazarus wrote: > >> +1 >> That would be the best solution. GUI programming is based on >> fundamentals than need to be understood first. >> > > -1 !! > > The OP explained that his main purpose is to introduce more fun in the > education. That can be done by plunging into programming directly with GUI > development. > > This is why RAD had been invented. > > Of course there are decent drawbacks regarding relying too much on RAD and > about not really understanding the fundamentals behind it. > > But in the end the addressees are non-computer engineers. > > -Michael > -- > _______________________________________________ > As an engineer , they need to write programs for doing computations not available in ready-made packages . Therefore , they need to a sufficient knowledge to write programs . This can be achieved in a good balance of learning programming itself and GUI application . Mehmet Erol Sanliturk -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.e.sanliturk at gmail.com Fri Oct 14 12:46:21 2016 From: m.e.sanliturk at gmail.com (Mehmet Erol Sanliturk) Date: Fri, 14 Oct 2016 03:46:21 -0700 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <0a969b04-5962-64f1-fd28-102053bf1eb1@lumino.de> References: <0a969b04-5962-64f1-fd28-102053bf1eb1@lumino.de> Message-ID: On Fri, Oct 14, 2016 at 1:50 AM, Michael Schnell via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > On 14.10.2016 00:13, Erwin van den Bosch via Lazarus wrote: > >> >> I'm not a big fan of the RAD development way any more. (I was years ago). >> The problem is that you should separate your business logic and the GUI. >> > This is absolutely true especially when doing large systems or (embedded) > systems that don't are tightly bundled with the GUI. But even there using > RAD for testing/debugging is a way for speed up the development. > > " > And here the addressees are non-computer engineers who most likely will > not do large systems on their own, but just should understand what > programming means to enable them to talk decently with their colleagues who > will do the programming for appropriate projects. > > " The above paragraph is not correct very much , because the computer engineers and the other engineers are different professions . The other engineers are using computer programming to solve their own problems , the computer engineers are using computer programming to solve other people's problems . Mehmet Erol Sanliturk > So a fast way ("RAD") to do and test a rather simple working project and > understand the basics > > With Delphi like RAD it's very difficult to do that. (but it is possible) >> Everything is coded in events and connected to database aware GUI controls. >> (In the case of a database application) >> > I don't think so. > > With a more careful design it's absolutely possible to do "non RAD" > programs by doing "GUI units" and "business code Units" that interact via > Objects with functions, properties and events (callback-properties) . > > I believe this is not more effort that using an external GUI designer. > > I did this for embedded projects using the GUI units for debugging and > testing and then replacing them by dummies without needing to modify the > business code units and hence being able to start testing again at any > time, while the "GUI-stripped" executable can used on a "headless" target > system > > -Michael > > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mailinglists at geldenhuys.co.uk Fri Oct 14 12:48:58 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Fri, 14 Oct 2016 11:48:58 +0100 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: Message-ID: <893039e1-ded3-bdc4-a24a-57063a3fc9e5@geldenhuys.co.uk> On 2016-10-13 23:13, Erwin van den Bosch via Lazarus wrote: > The problem is that you should separate your business logic and > the GUI. With Delphi like RAD it's very difficult to do that. (but it is > possible) Everything is coded in events and connected to database aware > GUI controls. (In the case of a database application) Exactly why I use tiOPF for every application I write - even non-Database applications. Also exactly why I implemented the MGM (Model-GUI-Mediator) design pattern for use with VCL, LCL and fpGUI Toolkit - also included in the tiOPF repository. All my form units are now VERY empty as all the real functionality lives in mediators. This also makes unit testing of my code much easier. > Another problem with the RAD way is that a lot is stored in forms (.lfm > files) and it's difficult to see/notice changes to those files. And exactly why I designed the fpGUI Visual Forms Designer to generate actual Object Pascal code in a AfterCreate() method, instead of using *.lfm or *.dfm files. I now have one unit in my source code revision system that shows all changes (no need review two files for form changes), I can easily do a search & replace for form components and other code, and I also don't need to fire up a visual form designer if I just want to make one small tweak to a property. 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 Fri Oct 14 13:01:05 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Fri, 14 Oct 2016 12:01:05 +0100 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> Message-ID: <34e032a0-2a68-09c2-19e0-ef390f78d3da@geldenhuys.co.uk> On 2016-10-14 09:18, Michael Schnell via Lazarus wrote: > The OP explained that his main purpose is to introduce more fun in the > education. That can be done by plunging into programming directly with > GUI development. So for somebody that doesn't know anything about programming, then suddenly using a Visual Form Designer, but when they look at the code that was generated they have NO idea what is going on. The don't know what a Class is, they don't know what Inheritance is. They don't know what Event Handlers are, what Properties are, what's the difference between 'var' and 'const' parameters etc. They will be thrown into the deep end and sink. The result - if they keep their head above water - they become "programmers" like that rubbish Visual Basic generation we saw in the late 90's, early 2000's. Writing horrific code because they actually don't have a clue what they are doing. Yeah, that sounds great! [major sarcasm] Start with the fundamentals, and maybe incite them every now and again with the same example done in a GUI environment. Just enough to keep them interested and excited in programming, but you have to get those fundamentals down, otherwise they have no base to build on. 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 nc-gaertnma at netcologne.de Fri Oct 14 13:04:00 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Fri, 14 Oct 2016 13:04:00 +0200 Subject: [Lazarus] Windows 10 force any non-white background color to White In-Reply-To: <5800A10E.9090207@avidsoft.com.hk> References: <5800A10E.9090207@avidsoft.com.hk> Message-ID: <20161014130400.4aab06e6@limapholos.matflo.wg> On Fri, 14 Oct 2016 17:10:38 +0800 Dennis via Lazarus wrote: > I have a program written in lazarus running normally in windows 7. > When run in windows 10, the green color of the Frame/Form is changed by > Windows 10 to white. > > Now my customer is complaining the bright white is hurting his eyes. > > Can anyone help? I googled and the only articles is about changing the > title bar color, not the form's color. This works here: When I set the Form1.Color to clGreen I see green background on Win10. Mattias From mailinglists at geldenhuys.co.uk Fri Oct 14 13:04:12 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Fri, 14 Oct 2016 12:04:12 +0100 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <34e032a0-2a68-09c2-19e0-ef390f78d3da@geldenhuys.co.uk> References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <34e032a0-2a68-09c2-19e0-ef390f78d3da@geldenhuys.co.uk> Message-ID: <4517fd9e-8ca2-2161-0954-e722e744de3a@geldenhuys.co.uk> On 2016-10-14 12:01, Graeme Geldenhuys via Lazarus wrote: > and maybe incite them every now and again Oops, that meant to read: "...and maybe entice them..." Regards, Graeme From m.e.sanliturk at gmail.com Fri Oct 14 13:08:13 2016 From: m.e.sanliturk at gmail.com (Mehmet Erol Sanliturk) Date: Fri, 14 Oct 2016 04:08:13 -0700 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <893039e1-ded3-bdc4-a24a-57063a3fc9e5@geldenhuys.co.uk> References: <893039e1-ded3-bdc4-a24a-57063a3fc9e5@geldenhuys.co.uk> Message-ID: On Fri, Oct 14, 2016 at 3:48 AM, Graeme Geldenhuys via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > On 2016-10-13 23:13, Erwin van den Bosch via Lazarus wrote: > > The problem is that you should separate your business logic and > > the GUI. With Delphi like RAD it's very difficult to do that. (but it is > > possible) Everything is coded in events and connected to database aware > > GUI controls. (In the case of a database application) > > Exactly why I use tiOPF for every application I write - even > non-Database applications. Also exactly why I implemented the MGM > (Model-GUI-Mediator) design pattern for use with VCL, LCL and fpGUI > Toolkit - also included in the tiOPF repository. > > All my form units are now VERY empty as all the real functionality lives > in mediators. This also makes unit testing of my code much easier. > > > > Another problem with the RAD way is that a lot is stored in forms (.lfm > > files) and it's difficult to see/notice changes to those files. > > And exactly why I designed the fpGUI Visual Forms Designer to generate > actual Object Pascal code in a AfterCreate() method, instead of using > *.lfm or *.dfm files. I now have one unit in my source code revision > system that shows all changes (no need review two files for form > changes), I can easily do a search & replace for form components and > other code, and I also don't need to fire up a visual form designer if I > just want to make one small tweak to a property. > > > 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 > -- > _______________________________________________ > I am reading/studying the fpGUI system . The problem here is that it is NOT an alternative to , let's say , Lazarus , in the sense that , the SAME program can not be compiled as a Lazarus program or an fpGUI program as it is like compiling the same program by Delphi ( with required compiler directives ) . It is necessary either use Lazarus or fpGUI programming . As an example , I want to convert my program to fpGUI . If I can do it , it may be more easy to convert it to C program . To convert it to fpGUI program is a hard problem because it is necessary to convert all of the GUI related parts ( because all of the unit names are different , I did not study their contents very much ) . In previous years https://sourceforge.net/projects/mseide-msegui/ was limited to Linux . I do not know whether the same program can be compiled as a Lazarus or MSEide program . During teaching , it is necessary to take care about such differences . Mehmet Erol Sanliturk -------------- next part -------------- An HTML attachment was scrubbed... URL: From l.rame at griensu.com Fri Oct 14 13:47:49 2016 From: l.rame at griensu.com (=?UTF-8?Q?Leonardo_M._Ram=c3=a9?=) Date: Fri, 14 Oct 2016 08:47:49 -0300 Subject: [Lazarus] Fast-small utilities for common javascript tasks, anyone? In-Reply-To: References: <89e6ac5e-b4a9-3aae-c9ce-eb23410ab890@griensu.com> <9d46f703-bc36-1b4c-d8b9-1b4cc825091b@griensu.com> <71ad79f1-b7b8-bd23-3a51-5dca00a55a1f@griensu.com> Message-ID: El 12/10/16 a las 10:50, Michael Van Canneyt escribió: > > On Wed, 12 Oct 2016, Leonardo M. Ramé via Lazarus wrote: > >> El 08/10/16 a las 05:18, Michael Van Canneyt via Lazarus escribió: >>> Hi Michael, could you post jsmin.pas here?. >>> >>> I added it to FPC SVN. packages/fcl-js, unit jsminifier. I included >>> an example program. >>> >>> Improvements and suggestions welcome. >>> >>> Michael. >> >> Thanks Michael, that's great!. >> >> BTW, I've found also a CSS Minifier, developed by Udo Schmal >> (http://www.gocher.me/CSSMin) I'll ask him if he allow us to add it >> to fcl-js. > > Great, that would come in handy as well !! > > Michael. Michael, I've got the answer from Udo Schmal, he gave permission to include the unit in fcl-js, here's his answer: > Hi Leonardo, > I've updated the code so that it doesn't need the two additional units as in > the old version. The code I published is based on some RegExp and is therefore > slow. Unfortunately I did not have time to change the code similar to the jsmin > function. > But, feel free to share the code. > > Regards, > Udo Schmal > http://www.gocher.me This is the link to the unit: http://www.gocher.me/code/css.pas -- Leonardo M. Ramé http://leonardorame.blogspot.com From mailinglists at geldenhuys.co.uk Fri Oct 14 13:50:32 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Fri, 14 Oct 2016 12:50:32 +0100 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: <893039e1-ded3-bdc4-a24a-57063a3fc9e5@geldenhuys.co.uk> Message-ID: <641b091b-55ec-8724-0a19-fd54ca5499c9@geldenhuys.co.uk> On 2016-10-14 12:08, Mehmet Erol Sanliturk wrote: > program can not be compiled as a Lazarus program or an fpGUI program as it > is like compiling the same program by Delphi ( with required compiler > directives ) . It is necessary either use Lazarus or fpGUI programming . I am yet to see that in reality! [excluding all but he most basic "Hello World" programs] I've never come across a real-world Delphi project that can simply be opened in Lazarus IDE and compiles 100% correctly first time. As proof of that, it would also explain why Lazarus IDE includes the "Tools -> Delphi conversion" set of menu items, which does a one-way conversion (thus you can't go back to Delphi). Saying that, yes it is partly possible to have a single project that is compilable in both Delphi and Lazarus, but it requires significant amounts of changes and compromises. I don't see any benefit in having dual compiler and dual toolkit support in a single project. > As an example , I want to convert my program to fpGUI . If I can do it , it > may be more easy to convert it to C program. To convert it to fpGUI > program is a hard problem because it is necessary to convert all of the GUI > related parts. And you think moving to C with a totally different GUI toolkit is any easier? I seriously doubt that. I think it is pretty straight forward to convert a Lazarus project to fpGUI - I've done it many times with components and whole applications. It's not a 5 minute job, but will be significantly less effort that moving to C/C++ and using GTK, Qt or wxWidgets etc. > was limited to Linux . I do not know whether the same program can be > compiled as a Lazarus or MSEide program . GUI programs - definitely not. Lazarus LCL and MSEgui are very different toolkits. Much more so than LCL vs fpGUI. 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 mse00000 at gmail.com Fri Oct 14 13:59:47 2016 From: mse00000 at gmail.com (Martin Schreiber) Date: Fri, 14 Oct 2016 13:59:47 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <0a969b04-5962-64f1-fd28-102053bf1eb1@lumino.de> References: <0a969b04-5962-64f1-fd28-102053bf1eb1@lumino.de> Message-ID: <201610141359.48073.mse00000@gmail.com> On Friday 14 October 2016 10:50:28 Michael Schnell via Lazarus wrote: > > With a more careful design it's absolutely possible to do "non RAD" > programs by doing "GUI units" and "business code Units" that interact > via Objects with functions, properties and events (callback-properties) . > Separating GUI and program logic is also possible with RAD. See for example MSEkicadBOM, the application I am currently working on. https://gitlab.com/mseide-msegui/mseuniverse/tree/master/tools/kicad/bom It is a component and footprint database program for KiCad. It consists of a datamodule with the program logic and the database and action components: http://mseide-msegui.sourceforge.net/pics/kicadbommainmo.png a mainform with the mainmenu, GUI actions and the main datagrid: http://mseide-msegui.sourceforge.net/pics/kicadbommainfo.png and several editforms: http://mseide-msegui.sourceforge.net/pics/kicadbomcomponented.png The editforms inherit from a common base editform with base functionality (datasource, navigator, timestamp display, window close logic...) and have no or GUI-code only. The connection GUI<>datamodule is made with TDataSource, action- and ifi-dataendpoint-components. If done right the RAD-approach is productive and convenient, the projects are easily extendable and maintainable. Martin From mse00000 at gmail.com Fri Oct 14 14:05:47 2016 From: mse00000 at gmail.com (Martin Schreiber) Date: Fri, 14 Oct 2016 14:05:47 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: <893039e1-ded3-bdc4-a24a-57063a3fc9e5@geldenhuys.co.uk> Message-ID: <201610141405.47525.mse00000@gmail.com> On Friday 14 October 2016 13:08:13 Mehmet Erol Sanliturk via Lazarus wrote: > > In previous years > > https://sourceforge.net/projects/mseide-msegui/ > > was limited to Linux . MSEide+MSEgui runs on Windows and Linux from start at 1999. Since several years it runs on FreeBSD too. Martin From reimgrab at web.de Fri Oct 14 14:01:45 2016 From: reimgrab at web.de (Reimar Grabowski) Date: Fri, 14 Oct 2016 14:01:45 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <1abaf000-7808-74fa-31f6-cb09d678d4c6@fastwebnet.it> References: <0033ad35-491e-87fa-c287-b47070aca673@geldenhuys.co.uk> <20161013164803.7c976459@darkbreed> <1abaf000-7808-74fa-31f6-cb09d678d4c6@fastwebnet.it> Message-ID: <20161014140145.1de4a272@darkbreed> On Thu, 13 Oct 2016 23:11:31 +0200 Giuliano Colla via Lazarus wrote: > Il 13/10/2016 16:48, Reimar Grabowski via Lazarus ha scritto: > > > If you want modern, teach them Java and let the programs run on their phones or keep doing console programs and do the GUI in JS (aka web applications). ^^ > > I find very unlikely that ... ^^ = ;) R. From m.e.sanliturk at gmail.com Fri Oct 14 14:02:57 2016 From: m.e.sanliturk at gmail.com (Mehmet Erol Sanliturk) Date: Fri, 14 Oct 2016 05:02:57 -0700 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <201610141405.47525.mse00000@gmail.com> References: <893039e1-ded3-bdc4-a24a-57063a3fc9e5@geldenhuys.co.uk> <201610141405.47525.mse00000@gmail.com> Message-ID: On Fri, Oct 14, 2016 at 5:05 AM, Martin Schreiber via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > On Friday 14 October 2016 13:08:13 Mehmet Erol Sanliturk via Lazarus wrote: > > > > > In previous years > > > > https://sourceforge.net/projects/mseide-msegui/ > > > > was limited to Linux . > > MSEide+MSEgui runs on Windows and Linux from start at 1999. Since several > years it runs on FreeBSD too. > > Martin > -- > _______________________________________________ > I am sorry that I did not include Windows . My intention was to say "other than Windows" , but remained incomplete . Mehmet Erol Sanliturk -------------- next part -------------- An HTML attachment was scrubbed... URL: From wkitty42 at windstream.net Fri Oct 14 14:11:42 2016 From: wkitty42 at windstream.net (wkitty42 at windstream.net) Date: Fri, 14 Oct 2016 08:11:42 -0400 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <4517fd9e-8ca2-2161-0954-e722e744de3a@geldenhuys.co.uk> References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <34e032a0-2a68-09c2-19e0-ef390f78d3da@geldenhuys.co.uk> <4517fd9e-8ca2-2161-0954-e722e744de3a@geldenhuys.co.uk> Message-ID: On 10/14/2016 07:04 AM, Graeme Geldenhuys via Lazarus wrote: > On 2016-10-14 12:01, Graeme Geldenhuys via Lazarus wrote: >> and maybe incite them every now and again > > Oops, that meant to read: "...and maybe entice them..." incite works, too :) -- NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list* unless private contact is specifically requested and granted. From mschnell at lumino.de Fri Oct 14 15:52:02 2016 From: mschnell at lumino.de (Michael Schnell) Date: Fri, 14 Oct 2016 15:52:02 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <34e032a0-2a68-09c2-19e0-ef390f78d3da@geldenhuys.co.uk> References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <34e032a0-2a68-09c2-19e0-ef390f78d3da@geldenhuys.co.uk> Message-ID: On 14.10.2016 13:01, Graeme Geldenhuys via Lazarus wrote: > They will be thrown into the deep end and sink. I don't think so. You can learn to drive a car even if you don't know how the engine is constructed. At first you can just *use* the GUI and later you can find out how it works. -Michael -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.e.sanliturk at gmail.com Fri Oct 14 16:07:59 2016 From: m.e.sanliturk at gmail.com (Mehmet Erol Sanliturk) Date: Fri, 14 Oct 2016 07:07:59 -0700 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <34e032a0-2a68-09c2-19e0-ef390f78d3da@geldenhuys.co.uk> Message-ID: On Fri, Oct 14, 2016 at 6:52 AM, Michael Schnell via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > On 14.10.2016 13:01, Graeme Geldenhuys via Lazarus wrote: > > They will be thrown into the deep end and sink. > > I don't think so. You can learn to drive a car even if you don't know how > the engine is constructed. > > At first you can just *use* the GUI and later you can find out how it > works. > > -Michael > > -- > _______________________________________________ > > My life is consumed in teaching . I had started as an elementary school teacher means that my profession was teaching ( not a university graduate , and then a professor , knowing approximately nothing about teaching since they are not a graduate of "Faculty of Education" ) . Then I went to University and become an instructor to teach computer programming ( mainly ) . Your opinion about how to teach programming ( i.e. , start from GUI , then teach ( if you can ) programming ) is physically wrong . Please think the situation from the point of view of students , not with respect to yourself . Mehmet Erol Sanliturk -------------- next part -------------- An HTML attachment was scrubbed... URL: From juergen.hestermann at gmx.de Fri Oct 14 16:10:19 2016 From: juergen.hestermann at gmx.de (=?UTF-8?Q?J=c3=bcrgen_Hestermann?=) Date: Fri, 14 Oct 2016 16:10:19 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <34e032a0-2a68-09c2-19e0-ef390f78d3da@geldenhuys.co.uk> Message-ID: Am 2016-10-14 um 15:52 schrieb Michael Schnell via Lazarus: > On 14.10.2016 13:01, Graeme Geldenhuys via Lazarus wrote: >> They will be thrown into the deep end and sink. > I don't think so. You can learn to drive a car even if you don't know how the engine is constructed. > At first you can just use the GUI and later you can find out how it works. In most cases they never get to the step "find out how it works". If it works, nobody wants to invest time anymore to look under the hood. So they always operate on the surface and repeat the same subobtimal programming over and over again because they don't know how to do it better. The problem is, that often it does *not* work (or at least not as good as expected) because of the lack of knowledge. Then such people without background knowledge desperately click on this and that and some have luck and suddenly it works (more or less). But they do not know why and they also do not know why the performance is so bad, but hey, as long as it more or less works.... From svaa at ciberpiula.net Fri Oct 14 16:18:32 2016 From: svaa at ciberpiula.net (Santiago A.) Date: Fri, 14 Oct 2016 16:18:32 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <1abaf000-7808-74fa-31f6-cb09d678d4c6@fastwebnet.it> References: <0033ad35-491e-87fa-c287-b47070aca673@geldenhuys.co.uk> <20161013164803.7c976459@darkbreed> <1abaf000-7808-74fa-31f6-cb09d678d4c6@fastwebnet.it> Message-ID: El 13/10/2016 a las 23:11, Giuliano Colla via Lazarus escribió: > but then one should always select the most "appropriate" technology, > and not be influenced by what is "modern". More modern means maybe with a few extra features. And in this context I suppose that "modern" also means more popular. Both points are important, being popular is also important, network effect is important. More users means more libraries, more beta testers, more information, more tools. So, better frameworks. Don't underestimate the "popular factor". -- Saludos Santiago A. From mailinglists at geldenhuys.co.uk Fri Oct 14 17:13:26 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Fri, 14 Oct 2016 16:13:26 +0100 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <34e032a0-2a68-09c2-19e0-ef390f78d3da@geldenhuys.co.uk> Message-ID: On 2016-10-14 15:10, Jürgen Hestermann via Lazarus wrote: > desperately click on this and that and some have luck and suddenly it works (more or less). > But they do not know why and they also do not know why the performance is so bad, > but hey, as long as it more or less works.... Straight from the Visual Basic 6 manual. :-p [okay, I'll stop bashing VB for now] Regards, Graeme From el.es.cr at gmail.com Fri Oct 14 17:24:04 2016 From: el.es.cr at gmail.com (Lukasz Sokol) Date: Fri, 14 Oct 2016 16:24:04 +0100 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <20161013164803.7c976459@darkbreed> References: <0033ad35-491e-87fa-c287-b47070aca673@geldenhuys.co.uk> <20161013164803.7c976459@darkbreed> Message-ID: On 13/10/16 15:48, Reimar Grabowski via Lazarus wrote: > On Thu, 13 Oct 2016 10:37:53 -0300 Adrian De Armas via Lazarus > wrote: > >> Introducing GUI is an efford to make the module more attractive to >> the students (the droupout rate is high). The module is taught as a >> basic science. All my students will be civil, environmental or bio >> engineers but not computer engineers. > > And nonetheless you think replacing matlab with pascal (or any other > language) is a good idea? If you just want a GUI to make it more > fancy matlab can provide that, too. > > If you want modern, teach them Java and let the programs run on their > phones or keep doing console programs and do the GUI in JS (aka web > applications). ^^ > D'oh, really. I recall the couple of days when i downloaded Android Studio and tried modifying the Bluetooth Chat example to do what I want... I only wanted to put a couple of tracking sliders (for 'analog' direction and speed control). and make it send characters repeatedly to the serial Bluetooth device on the other side of the link... It did work in the end though, but any attempts to mod out the existing gui controls in any way were mostly greeted by app crash. I ended up trying to squeeze my controls into available space... I still haven't recovered from the experience. > R. > -L. From mailinglists at geldenhuys.co.uk Fri Oct 14 17:48:17 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Fri, 14 Oct 2016 16:48:17 +0100 Subject: [Lazarus] Watch List shows absolute rubbish Message-ID: <07f10d38-64d8-69c5-810a-b85dd96a301c@geldenhuys.co.uk> Hi, Is it a known issue that the Watch List shows absolute rubbish from time to time??? Or at least that you can't trust the details is does show? Take a look at the screenshot attached. Look at the code, and the Watch window. Note the value of "i" and "FShowDeleted" in the Watch window. It is the first iteration in the "for i ..." loop, so "i" should be Zero. Now take a look at what the Watch List shows! In the second case, the FShowDeleted is a boolean field variable and currently has the value False, but again, look at what the Watch window shows. How the hell is one supposed to do debugging like this?? I've just wasted hours debugging code, thinking that the information in the Watch List is reliable. WTF. Sorry, but I'm fuming mad at this point [if you haven't guessed]. I'm running FreeBSD 10.3 (64-bit) with 64-bit FPC 2.6.4 and Lazarus from trunk (updated 2 weeks ago). GDB version 7.11.1. If FreeBSD is not a supported environment for Lazarus, then please state so clearly and I'll stop using Lazarus under it. ps: Why are some lines painted in grey in the Watch List? Does that have anything to do with this issue? 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 -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot1.png Type: image/png Size: 17380 bytes Desc: not available URL: From mailinglists at geldenhuys.co.uk Fri Oct 14 18:02:44 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Fri, 14 Oct 2016 17:02:44 +0100 Subject: [Lazarus] Watch List shows absolute rubbish In-Reply-To: <07f10d38-64d8-69c5-810a-b85dd96a301c@geldenhuys.co.uk> References: <07f10d38-64d8-69c5-810a-b85dd96a301c@geldenhuys.co.uk> Message-ID: <5448acbc-e767-f0cb-db5b-d111ba53ca17@geldenhuys.co.uk> On 2016-10-14 16:48, Graeme Geldenhuys via Lazarus wrote: > How the hell is one supposed to do debugging like this?? I guess the answer is to simply use MSEide to debug LCL applications (and all other applications too). Attached is a screenshot of the same watch list and also in the first iteration of the for loop. NOTE that MSEide does just fine displaying the _real_ values in the Watch List window. MSEide was running under the exact same environment as what my Lazarus IDE did. Using the same FPC compiler and GDB debugger. 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 -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot2_mseide.png Type: image/png Size: 14671 bytes Desc: not available URL: From reimgrab at web.de Fri Oct 14 18:16:26 2016 From: reimgrab at web.de (Reimar Grabowski) Date: Fri, 14 Oct 2016 18:16:26 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: <0033ad35-491e-87fa-c287-b47070aca673@geldenhuys.co.uk> <20161013164803.7c976459@darkbreed> Message-ID: <20161014181626.364f286a@darkbreed> On Fri, 14 Oct 2016 16:24:04 +0100 Lukasz Sokol via Lazarus wrote: > D'oh, really. > D'oh, really? (fixed that for you) Answer: No (well actually the part about matlab I meant serious) Reminder to myself: The interwebz dozn't get sarcazm The interwebz dozn't get sarcazm The interwebz dozn't get sarcazm R. From nc-gaertnma at netcologne.de Fri Oct 14 18:30:34 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Fri, 14 Oct 2016 18:30:34 +0200 Subject: [Lazarus] TPageControl cannot change parent In-Reply-To: <606c0198-3922-e656-2492-7cbc7b11784c@epidata.info> References: <606c0198-3922-e656-2492-7cbc7b11784c@epidata.info> Message-ID: <20161014183034.0c6282c5@limapholos.matflo.wg> On Fri, 14 Oct 2016 12:16:25 +0200 Torsten Bonde Christiansen via Lazarus wrote: >[...] > In the designer it is not posible to use the builtin feature of "Change > Parent" (from the context menu) with a TPageControl. Other controls > seems to work fine (although i have not tested all of them). > > To recreate the problem slap a TPanel and a TPageControl on the mainform > and add a single tabsheet. Use "Change Parent" on the Pagecontrol and > change it to the panel - and bang. >[...] > This is as far as it goes. Please create a bug report. > On a side node - it IS posible to select a tabsheet and change the > parent to the panel, which IMO should not be posible. And for that too. Mattias From pascaldragon at googlemail.com Fri Oct 14 19:17:17 2016 From: pascaldragon at googlemail.com (Sven Barth) Date: Fri, 14 Oct 2016 19:17:17 +0200 Subject: [Lazarus] Windows 10 force any non-white background color to White In-Reply-To: References: <5800A10E.9090207@avidsoft.com.hk> Message-ID: Am 14.10.2016 11:10 schrieb "Dennis via Lazarus" < lazarus at lists.lazarus-ide.org>: > > I have a program written in lazarus running normally in windows 7. > When run in windows 10, the green color of the Frame/Form is changed by Windows 10 to white. Can you reproduce this in a small example program so that differences regarding the project settings can be avoided? Regards, Sven -------------- next part -------------- An HTML attachment was scrubbed... URL: From lazarus at mfriebe.de Fri Oct 14 19:45:56 2016 From: lazarus at mfriebe.de (Martin Frb) Date: Fri, 14 Oct 2016 18:45:56 +0100 Subject: [Lazarus] Watch List shows absolute rubbish In-Reply-To: <5448acbc-e767-f0cb-db5b-d111ba53ca17@geldenhuys.co.uk> References: <07f10d38-64d8-69c5-810a-b85dd96a301c@geldenhuys.co.uk> <5448acbc-e767-f0cb-db5b-d111ba53ca17@geldenhuys.co.uk> Message-ID: <847e9ed3-a420-0926-33e2-19124e1f1b8b@mfriebe.de> On 14/10/2016 17:02, Graeme Geldenhuys via Lazarus wrote: > On 2016-10-14 16:48, Graeme Geldenhuys via Lazarus wrote: >> How the hell is one supposed to do debugging like this?? > I guess the answer is to simply use MSEide to debug LCL applications > (and all other applications too). Attached is a screenshot of the same > watch list and also in the first iteration of the for loop. NOTE that > MSEide does just fine displaying the _real_ values in the Watch List window. > > MSEide was running under the exact same environment as what my Lazarus > IDE did. Using the same FPC compiler and GDB debugger. And the same compiler settings? Both on -O1 ? (or whatever level) Such incorrect results are sometimes caused by -O1, while -O- will be fine. From mailinglists at geldenhuys.co.uk Fri Oct 14 20:14:22 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Fri, 14 Oct 2016 19:14:22 +0100 Subject: [Lazarus] Watch List shows absolute rubbish In-Reply-To: <847e9ed3-a420-0926-33e2-19124e1f1b8b@mfriebe.de> References: <07f10d38-64d8-69c5-810a-b85dd96a301c@geldenhuys.co.uk> <5448acbc-e767-f0cb-db5b-d111ba53ca17@geldenhuys.co.uk> <847e9ed3-a420-0926-33e2-19124e1f1b8b@mfriebe.de> Message-ID: <02bcebd6-55e5-1ceb-e26c-6108abbbcf2e@geldenhuys.co.uk> On 2016-10-14 18:45, Martin Frb via Lazarus wrote: > And the same compiler settings? Both have the exact same compiler settings... -l -Mobjfpc -Sh -Sc -Si -gl -O- -gh -dUseCThreads -viewn I excluded the unit paths from the above list of compiler options. 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 lazarus at mfriebe.de Fri Oct 14 21:45:01 2016 From: lazarus at mfriebe.de (Martin Frb) Date: Fri, 14 Oct 2016 20:45:01 +0100 Subject: [Lazarus] Watch List shows absolute rubbish In-Reply-To: <02bcebd6-55e5-1ceb-e26c-6108abbbcf2e@geldenhuys.co.uk> References: <07f10d38-64d8-69c5-810a-b85dd96a301c@geldenhuys.co.uk> <5448acbc-e767-f0cb-db5b-d111ba53ca17@geldenhuys.co.uk> <847e9ed3-a420-0926-33e2-19124e1f1b8b@mfriebe.de> <02bcebd6-55e5-1ceb-e26c-6108abbbcf2e@geldenhuys.co.uk> Message-ID: On 14/10/2016 19:14, Graeme Geldenhuys via Lazarus wrote: > On 2016-10-14 18:45, Martin Frb via Lazarus wrote: >> And the same compiler settings? > Both have the exact same compiler settings... > > -l -Mobjfpc -Sh -Sc -Si -gl -O- -gh -dUseCThreads -viewn > > I excluded the unit paths from the above list of compiler options. > Ok, thats a first, never seen that before. Can you produce a logfile http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#Log_info_for_debug_session If you open the "locals" window, it should have "i", same error? What happens in mseide, if you type/watch uppercase I or FSHOWDELETED ? For info, some previous gdb, did not find some variables, unless they where uppercased. Normally gdb ignores case, so Lazarus uppercases all vars, and that worked fine in the past. Maybe gdb 7.11[.1] has an issue with this? ------------ Btw, I have no idea why some are grey. I would think either selection or focus? From mailinglists at geldenhuys.co.uk Sat Oct 15 00:09:38 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Fri, 14 Oct 2016 23:09:38 +0100 Subject: [Lazarus] Watch List shows absolute rubbish In-Reply-To: References: <07f10d38-64d8-69c5-810a-b85dd96a301c@geldenhuys.co.uk> <5448acbc-e767-f0cb-db5b-d111ba53ca17@geldenhuys.co.uk> <847e9ed3-a420-0926-33e2-19124e1f1b8b@mfriebe.de> <02bcebd6-55e5-1ceb-e26c-6108abbbcf2e@geldenhuys.co.uk> Message-ID: <4449fdcc-a9ea-558c-61b5-ce0f16ec32c1@geldenhuys.co.uk> On 2016-10-14 20:45, Martin Frb via Lazarus wrote: > Ok, thats a first, never seen that before. I finally found the cause of the problem. I don’t use build modes in Lazarus, so only ever looked at the “Project Options -> Compiler Options -> Compilation and Linking” screen. That’s where I set the -O- option, and I also set other debugging options in the “Compiler Options -> Debugging” screen, like the -gl and -gh options. What I didn’t realize was that inside “Compiler Options -> Additions and Overrides”, there was a “Stored in IDE” custom option (there are actually a few defined), and one of the active options was -O2. And that optimisation option is what caused all the trouble. Lovely conflicting options with no warning. Personally I think the Compiler Options screens in Lazarus is a huge confusing mess. The IDE dialog designers should take some cues from MSEide’s Project Options dialog. In MSEide all build/make option are located in one place/screen with an instant overview of all build modes. What you see is what you get. No hidden settings from other screens. Anyway. Thank you very much Martin for taking the time in trying to help me. I apologise for my heated messages from earlier. At that point I wasted so many hours, and were at boiling point for some time. That probably wasn’t the best time to write a message either. Regards, Graeme From dec12 at avidsoft.com.hk Sat Oct 15 12:04:25 2016 From: dec12 at avidsoft.com.hk (Dennis) Date: Sat, 15 Oct 2016 18:04:25 +0800 Subject: [Lazarus] Windows 10 force any non-white background color to White In-Reply-To: References: <5800A10E.9090207@avidsoft.com.hk> Message-ID: <5801FF29.8080001@avidsoft.com.hk> Sven Barth via Lazarus wrote: > > > Am 14.10.2016 11:10 schrieb "Dennis via Lazarus" > >: > > > > I have a program written in lazarus running normally in windows 7. > > When run in windows 10, the green color of the Frame/Form is changed > by Windows 10 to white. > > Can you reproduce this in a small example program so that differences > regarding the project settings can be avoided? > > Regards, > Sven > > > Attached is a simple test project. Within the zip are 2 screen capture of the same program running in win 7 64 bit and Win 10 64 bit. The project was created with Lazarus 1.7; fpc 3.1.1 SVN 52643. Thanks so much for help. Dennis -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: test.zip Type: application/x-zip-compressed Size: 140414 bytes Desc: not available URL: From werner.pamler at freenet.de Sat Oct 15 16:58:55 2016 From: werner.pamler at freenet.de (Werner Pamler) Date: Sat, 15 Oct 2016 16:58:55 +0200 Subject: [Lazarus] Windows 10 force any non-white background color to White In-Reply-To: <5801FF29.8080001@avidsoft.com.hk> References: <5800A10E.9090207@avidsoft.com.hk> <5801FF29.8080001@avidsoft.com.hk> Message-ID: <6f8ba410-bfb5-98a0-e2a8-da5bf1fd7d03@freenet.de> Am 15.10.2016 um 12:04 schrieb Dennis via Lazarus: > Attached is a simple test project. Within the zip are 2 screen capture > of the same program running in win 7 64 bit and Win 10 64 bit. > The project was created with Lazarus 1.7; fpc 3.1.1 SVN 52643. For me, the frame is white in both Win7 and Win10. Did you deactivate themes in Win7? Your screenshot looks like this. This would switch to the old Win95 style, and give you back control over the color of many controls. In Lazarus, you can turn theme support off by unchecking "Use manifest file to enable themes" in the Project Options. This works also in Win10 - see attached screenshot: -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: japomoglnlcmlhma.png Type: image/png Size: 6417 bytes Desc: not available URL: From el.es.cr at gmail.com Sat Oct 15 22:02:49 2016 From: el.es.cr at gmail.com (el es) Date: Sat, 15 Oct 2016 21:02:49 +0100 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <20161014181626.364f286a@darkbreed> References: <0033ad35-491e-87fa-c287-b47070aca673@geldenhuys.co.uk> <20161013164803.7c976459@darkbreed> <20161014181626.364f286a@darkbreed> Message-ID: On 14-Oct-16 17:16, Reimar Grabowski via Lazarus wrote: > On Fri, 14 Oct 2016 16:24:04 +0100 > Lukasz Sokol via Lazarus wrote: > >> D'oh, really. > >> D'oh, really? (fixed that for you) > Answer: No (well actually the part about matlab I meant serious) > Ah Matlab. Happy TU days. Calculating 2D FFT of a picture or trying to implement discrete audio filters with just a couple of lines of code ;) Transformation of bitmaps through 2D FFT, applying bandpass filters and rev-2D-FFT ;) > Reminder to myself: > The interwebz dozn't get sarcazm > The interwebz dozn't get sarcazm > The interwebz dozn't get sarcazm > if you want sarcasm, go xkcd (386) ;) > R. > el es From dec12 at avidsoft.com.hk Mon Oct 17 08:44:12 2016 From: dec12 at avidsoft.com.hk (Dennis) Date: Mon, 17 Oct 2016 14:44:12 +0800 Subject: [Lazarus] Windows 10 force any non-white background color to White In-Reply-To: <6f8ba410-bfb5-98a0-e2a8-da5bf1fd7d03@freenet.de> References: <5800A10E.9090207@avidsoft.com.hk> <5801FF29.8080001@avidsoft.com.hk> <6f8ba410-bfb5-98a0-e2a8-da5bf1fd7d03@freenet.de> Message-ID: <5804733C.8000709@avidsoft.com.hk> Werner Pamler via Lazarus wrote: > > Am 15.10.2016 um 12:04 schrieb Dennis via Lazarus: > >> Attached is a simple test project. Within the zip are 2 screen >> capture of the same program running in win 7 64 bit and Win 10 64 bit. >> The project was created with Lazarus 1.7; fpc 3.1.1 SVN 52643. > For me, the frame is white in both Win7 and Win10. Did you deactivate > themes in Win7? Your screenshot looks like this. This would switch to > the old Win95 style, and give you back control over the color of many > controls. In Lazarus, you can turn theme support off by unchecking > "Use manifest file to enable themes" in the Project Options. This > works also in Win10 - see attached screenshot: > > > > Yes, I disabled themes in win 7 (and forgot about it). Thank you so much. It worked after unchecking the "Use manifest file to enable themes". It would be even better if the options can be changed in runtime so that users can decide whether to enable themes. Dennis -------------- next part -------------- An HTML attachment was scrubbed... URL: From mschnell at lumino.de Mon Oct 17 10:52:14 2016 From: mschnell at lumino.de (Michael Schnell) Date: Mon, 17 Oct 2016 10:52:14 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <34e032a0-2a68-09c2-19e0-ef390f78d3da@geldenhuys.co.uk> Message-ID: <430d7a68-0e1c-8e81-a87f-c9ef4e7ff3bd@lumino.de> On 14.10.2016 16:10, Jürgen Hestermann via Lazarus wrote: > > In most cases they never get to the step "find out how it works". > If it works, nobody wants to invest time anymore to look under the hood. > So they always operate on the surface and repeat the same > subobtimal programming over and over again > because they don't know how to do it better. > That is absolutely correct. But the point where the "knowing how it works" is just a matter of deliberate choice (or the professor, the student or the situation you get in and need to crawl deeper into the complexity of the matter.- - do I need know how/why the GUI builder creates the code that makes a Button visible on a Form and my Event handler be called when a button is pressed ? (I.e. do I need to be able to write the code myself without the help of the GUI builder ?) - do I need to know how the startup code works that make the Form visible on the screen ? - do I need to know how the Event-Queue and the checksynchronize() system works ? - do I need to know what system, calls the pascal program performs ? - do I need to know what ASM code is generated from a pascal instruction ? - do I need to know how semaphores are done by atomic instructions ? - do I need to tell the difference between CISC and RISC ? - do I need to know what microcode the CPU runs ? - do I need to know how a transistor works ? - do I need to know how dotating silicone is done ? In most cases it's better to first concentrate on the task at hand and dig deeper if necessary. -Michael From tc at epidata.info Mon Oct 17 10:58:50 2016 From: tc at epidata.info (Torsten Bonde Christiansen) Date: Mon, 17 Oct 2016 10:58:50 +0200 Subject: [Lazarus] TPageControl cannot change parent In-Reply-To: <20161014183034.0c6282c5@limapholos.matflo.wg> References: <606c0198-3922-e656-2492-7cbc7b11784c@epidata.info> <20161014183034.0c6282c5@limapholos.matflo.wg> Message-ID: On 2016-10-14 18:30, Mattias Gaertner via Lazarus wrote: > On Fri, 14 Oct 2016 12:16:25 +0200 Torsten Bonde Christiansen via > Lazarus wrote: >> [...] In the designer it is not posible to use the builtin feature of >> "Change Parent" (from the context menu) with a TPageControl. Other >> controls seems to work fine (although i have not tested all of them). >> To recreate the problem slap a TPanel and a TPageControl on the >> mainform and add a single tabsheet. Use "Change Parent" on the >> Pagecontrol and change it to the panel - and bang. [...] This is as >> far as it goes. > Please create a bug report. Done: http://bugs.freepascal.org/view.php?id=30752 >> On a side node - it IS posible to select a tabsheet and change the >> parent to the panel, which IMO should not be posible. > And for that too. Done: http://bugs.freepascal.org/view.php?id=30753 -Torsten. From mailinglists at geldenhuys.co.uk Mon Oct 17 11:07:09 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Mon, 17 Oct 2016 10:07:09 +0100 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <430d7a68-0e1c-8e81-a87f-c9ef4e7ff3bd@lumino.de> References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <34e032a0-2a68-09c2-19e0-ef390f78d3da@geldenhuys.co.uk> <430d7a68-0e1c-8e81-a87f-c9ef4e7ff3bd@lumino.de> Message-ID: <4ce22310-4fee-9b37-651f-1685ad90163b@geldenhuys.co.uk> On 2016-10-17 09:52, Michael Schnell via Lazarus wrote: > - do I need know how/why the GUI builder creates the code that makes a > Button visible on a Form and my Event handler be called when a button > is pressed ? Yes (I.e. do I need to be able to write the code myself > without the help of the GUI builder ?) Yes > - do I need to know how the startup code works that make the Form > visible on the screen ? Yes > - do I need to know how the Event-Queue and the checksynchronize() > system works ? If you are using queues and Synchronise, then Yes. > - do I need to know what system, calls the pascal program performs ? No The rest of your questions were just flame bait so don't deserve an answer. If you don't know any of the above, how do you expect to do any debugging? Yes, debugging is a major part of being a programmer. You made the [totally wrong] comparison earlier about learning to drive a car and knowing how the engine is constructed. Well, a programmer is not the driver of the car, he/she is the engineer designing and building the car. The driver is more like the end-user using your program. So YES, a programmer needs to know how the internals of a program works and fits together, after all, it is the programmer that designs the program and puts it together (coding). 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 mschnell at lumino.de Mon Oct 17 11:48:23 2016 From: mschnell at lumino.de (Michael Schnell) Date: Mon, 17 Oct 2016 11:48:23 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <4ce22310-4fee-9b37-651f-1685ad90163b@geldenhuys.co.uk> References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <34e032a0-2a68-09c2-19e0-ef390f78d3da@geldenhuys.co.uk> <430d7a68-0e1c-8e81-a87f-c9ef4e7ff3bd@lumino.de> <4ce22310-4fee-9b37-651f-1685ad90163b@geldenhuys.co.uk> Message-ID: On 17.10.2016 11:07, Graeme Geldenhuys via Lazarus wrote: > YES ...YES...NO... IMHO a personal POV that is not very helpful in a totally general discussion (please keep in mind that the intention of the OP to consider Pascal instead of C was to keep the students from running away too soon. > The rest of your questions were just flame bait so don't deserve an answer. > > > If you don't know any of the above, ... I only mentioned examples about which I do have a certain amount of knowledge. Of course there are a lot more layers and interesting stuff to learn that might be helpful in certain situations. -Michael (usually I get bashed for digging to deep and hence not being effective) From mschnell at lumino.de Mon Oct 17 12:13:45 2016 From: mschnell at lumino.de (Michael Schnell) Date: Mon, 17 Oct 2016 12:13:45 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <4ce22310-4fee-9b37-651f-1685ad90163b@geldenhuys.co.uk> References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <34e032a0-2a68-09c2-19e0-ef390f78d3da@geldenhuys.co.uk> <430d7a68-0e1c-8e81-a87f-c9ef4e7ff3bd@lumino.de> <4ce22310-4fee-9b37-651f-1685ad90163b@geldenhuys.co.uk> Message-ID: <25a8306a-7188-4490-1c43-a062a08915ef@lumino.de> Generally speaking: Getting confronted with the limits, imposed by lack of knowledge to your work to get a task done is a great motivation for learning. Being forced by the tutor to learn stuff you don't immediately need to get the task at hand done is a great motivation to give up. -Michael From mschnell at lumino.de Mon Oct 17 12:16:54 2016 From: mschnell at lumino.de (Michael Schnell) Date: Mon, 17 Oct 2016 12:16:54 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <4ce22310-4fee-9b37-651f-1685ad90163b@geldenhuys.co.uk> References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <34e032a0-2a68-09c2-19e0-ef390f78d3da@geldenhuys.co.uk> <430d7a68-0e1c-8e81-a87f-c9ef4e7ff3bd@lumino.de> <4ce22310-4fee-9b37-651f-1685ad90163b@geldenhuys.co.uk> Message-ID: <1b65af14-c9b1-f79f-e2ee-232a5c3d6703@lumino.de> On 17.10.2016 11:07, Graeme Geldenhuys via Lazarus wrote: > a programmer needs to know how the internals of a program works and This obviously includes the details of the OS API and the assembler code (while admittedly other examples I (posted don't need to be denoted as related to the "program"). -Michael From noreply at z505.com Mon Oct 17 21:05:55 2016 From: noreply at z505.com (Lars) Date: Mon, 17 Oct 2016 13:05:55 -0600 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> Message-ID: <6be99731f84dd3cd4176185537002d09.squirrel@gator3286.hostgator.com> > On 14/10/16 08:30, Michael Schnell via Lazarus wrote: > > > Of course there are decent drawbacks regarding relying too much on RAD > and about not really understanding the fundamentals behind it. But in the > end the addressees are non-computer engineers. The big issue with teaching using a RAD tool, is welding the program logic into the onclick events, instead of decoupling the logic in separate procedures that can be reused elsewhere. RAD tools are superior at prototyping... I can't believe how awesome they are at that. They are inferior, however, when it comes to bad habits being brought on. With this warning, RAD tools can still be very useful for writing solid programs, as long as one knows this warning ahead of time. When I first learned delphi I made the mistake of putting code in the onClick events and similar, and then when you expand your app later you realize all that code is welded in place and cannot be reused outside of the events. Of course decoupling the logic from the GUI leads to more layers of code. How I got rid of my bad habits when I first learned delphi: I started writing console apps with no object oriented programming, no events, and learned that not everything is a click event in computer programming. People late in the game (learned programming when GUI's were available) and have no experience with console mode apps will earn some bad habits because of the GUI oriented programming. Those with experience in other areas of programming such as old Dos programs, web programs (basically like a dos or unix console program) will learn different ways of organizing code without everything being tied to a GUI event driven code. I suppose even doing a plain Win32 API app with no delphi code (pure win api) would help someone learn how to organize code from a second opinion view, without being forced to use the event driven system you were given by the RAD tool. Of course, also learning other programming languages helps (although, IMO learning too many brain dead languages and hip cool ones will not help, as much as others claim... Basic programmers from the 80's or 70's still think in GOTO's and line numbers) From m.e.sanliturk at gmail.com Tue Oct 18 03:32:26 2016 From: m.e.sanliturk at gmail.com (Mehmet Erol Sanliturk) Date: Mon, 17 Oct 2016 18:32:26 -0700 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <6be99731f84dd3cd4176185537002d09.squirrel@gator3286.hostgator.com> References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <6be99731f84dd3cd4176185537002d09.squirrel@gator3286.hostgator.com> Message-ID: On Mon, Oct 17, 2016 at 12:05 PM, Lars via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > > On 14/10/16 08:30, Michael Schnell via Lazarus wrote: > > > > > > Of course there are decent drawbacks regarding relying too much on RAD > > and about not really understanding the fundamentals behind it. But in the > > end the addressees are non-computer engineers. > > The big issue with teaching using a RAD tool, is welding the program logic > into the onclick events, instead of decoupling the logic in separate > procedures that can be reused elsewhere. RAD tools are superior at > prototyping... I can't believe how awesome they are at that. They are > inferior, however, when it comes to bad habits being brought on. With > this warning, RAD tools can still be very useful for writing solid > programs, as long as one knows this warning ahead of time. > > When I first learned delphi I made the mistake of putting code in the > onClick events and similar, and then when you expand your app later you > realize all that code is welded in place and cannot be reused outside of > the events. > > Of course decoupling the logic from the GUI leads to more layers of code. > > ------------- > How I got rid of my bad habits when I first learned delphi: I started > writing console apps with no object oriented programming, no events, and > learned that not everything is a click event in computer programming. > > ------------- My opinion is that the above ideas are really very good to be applied during teaching : First , teach language on , let's say , "atomic" problems . Then , use these "atomic" concepts in further problems either embedded in a GUI or console program . One obvious point is that an "event" driven programming knowledge is a must to become a competent programmer . The problem is how this can be learned . Without knowing how to program an algorithm when a related event is occurred , will bring any one to nothing means ( not to a success ) . ------------- > People late in the game (learned programming when GUI's were available) > and have no experience with console mode apps will earn some bad habits > because of the GUI oriented programming. Those with experience in other > areas of programming such as old Dos programs, web programs (basically > like a dos or unix console program) will learn different ways of > organizing code without everything being tied to a GUI event driven code. > > I suppose even doing a plain Win32 API app with no delphi code (pure win > api) would help someone learn how to organize code from a second opinion > view, without being forced to use the event driven system you were given > by the RAD tool. > > ------------- > Of course, also learning other programming languages helps (although, IMO > learning too many brain dead languages and hip cool ones will not help, as > much as others claim... Basic programmers from the 80's or 70's still > think in GOTO's and line numbers) > -- > ------------- With respect to researches ( I am not able to supply links now because this view is based on old times readings , but I am sure that such research findings can be found ) , people ( mostly ) uses a "primary" language for her/his profession and a "secondary" language for some her/his works as an additional tool . This shows that during teaching , this feature should be taken into consideration : Guide the students to discover which language she/he will prefer to use in much of her/his works , and attempt to teach that language in a "best" way to be used by the students in their profession . A similar approach should also be used for a "secondary" language . If a language is taught just for fun or whatever else other than being a possible candidate for "primary" or "secondary" is likely that , if it not a necessity for the learner , is only a waste of everything is involved . Mehmet Erol Sanliturk -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmlandmesser at gmx.de Tue Oct 18 09:15:15 2016 From: jmlandmesser at gmx.de (Landmesser John) Date: Tue, 18 Oct 2016 09:15:15 +0200 Subject: [Lazarus] Windows and german Umlauts: why do i have to PWideChar(UTF8Decode(String)) and not UTF8ToAnsi(String) Message-ID: <5805CC03.2030202@gmx.de> I know how to deal with german Umlauts but I would like to understand. Think of a *.csv file that contains strings like "Grünberg" and that has to be opened in Excel ( Office 2003 ). It works if i use PWideChar(UTF8Decode(String)). Got this tipp here in the mailinglist! But UTF8ToAnsi(String) fails. Why is UTF8ToAnsi(String) not enough? LHelp tells me about UTF8ToAnsi(): "Utf8ToAnsi converts an utf8-encode unicode string to an ansistring. It converts the string to a widestring and then converts the widestring to an ansistring." That is NOT the same as PWideChar(UTF8Decode(String))? Tipps are welcome. Thank you!! From nc-gaertnma at netcologne.de Tue Oct 18 09:36:12 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Tue, 18 Oct 2016 09:36:12 +0200 Subject: [Lazarus] Windows and german Umlauts: why do i have to PWideChar(UTF8Decode(String)) and not UTF8ToAnsi(String) In-Reply-To: <5805CC03.2030202@gmx.de> References: <5805CC03.2030202@gmx.de> Message-ID: <20161018093612.4d2a9552@limapholos.matflo.wg> On Tue, 18 Oct 2016 09:15:15 +0200 Landmesser John via Lazarus wrote: > I know how to deal with german Umlauts but I would like to understand. > > Think of a *.csv file that contains strings like "Grünberg" and that > has to be opened in Excel ( Office 2003 ). > > It works if i use PWideChar(UTF8Decode(String)). Got this tipp here in > the mailinglist! > > But UTF8ToAnsi(String) fails. > > Why is UTF8ToAnsi(String) not enough? > > LHelp tells me about UTF8ToAnsi(): > "Utf8ToAnsi converts an utf8-encode unicode string to an ansistring. It > converts the string to a widestring and then converts the widestring to > an ansistring." > > That is NOT the same as PWideChar(UTF8Decode(String))? Obviously, because one produces an 8-bit string and the other a 16-bit string. How do you compare the result? What compiler version? Are you using LazUTF8? What is your DefaultSystemCodePage? Mattias From trayres at gmail.com Tue Oct 18 09:48:20 2016 From: trayres at gmail.com (Travis Ayres) Date: Tue, 18 Oct 2016 00:48:20 -0700 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <6be99731f84dd3cd4176185537002d09.squirrel@gator3286.hostgator.com> Message-ID: I'm all for this effort, and hope it leads to new and modern tutorials, books or notes that would be useful for others that use FreePascal/Lazarus to convey graphical system interactions. If there's any need to proofread such materials, I'll gladly help out! On Oct 17, 2016 6:32 PM, "Mehmet Erol Sanliturk via Lazarus" < lazarus at lists.lazarus-ide.org> wrote: On Mon, Oct 17, 2016 at 12:05 PM, Lars via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > > On 14/10/16 08:30, Michael Schnell via Lazarus wrote: > > > > > > Of course there are decent drawbacks regarding relying too much on RAD > > and about not really understanding the fundamentals behind it. But in the > > end the addressees are non-computer engineers. > > The big issue with teaching using a RAD tool, is welding the program logic > into the onclick events, instead of decoupling the logic in separate > procedures that can be reused elsewhere. RAD tools are superior at > prototyping... I can't believe how awesome they are at that. They are > inferior, however, when it comes to bad habits being brought on. With > this warning, RAD tools can still be very useful for writing solid > programs, as long as one knows this warning ahead of time. > > When I first learned delphi I made the mistake of putting code in the > onClick events and similar, and then when you expand your app later you > realize all that code is welded in place and cannot be reused outside of > the events. > > Of course decoupling the logic from the GUI leads to more layers of code. > > ------------- > How I got rid of my bad habits when I first learned delphi: I started > writing console apps with no object oriented programming, no events, and > learned that not everything is a click event in computer programming. > > ------------- My opinion is that the above ideas are really very good to be applied during teaching : First , teach language on , let's say , "atomic" problems . Then , use these "atomic" concepts in further problems either embedded in a GUI or console program . One obvious point is that an "event" driven programming knowledge is a must to become a competent programmer . The problem is how this can be learned . Without knowing how to program an algorithm when a related event is occurred , will bring any one to nothing means ( not to a success ) . ------------- > People late in the game (learned programming when GUI's were available) > and have no experience with console mode apps will earn some bad habits > because of the GUI oriented programming. Those with experience in other > areas of programming such as old Dos programs, web programs (basically > like a dos or unix console program) will learn different ways of > organizing code without everything being tied to a GUI event driven code. > > I suppose even doing a plain Win32 API app with no delphi code (pure win > api) would help someone learn how to organize code from a second opinion > view, without being forced to use the event driven system you were given > by the RAD tool. > > ------------- > Of course, also learning other programming languages helps (although, IMO > learning too many brain dead languages and hip cool ones will not help, as > much as others claim... Basic programmers from the 80's or 70's still > think in GOTO's and line numbers) > -- > ------------- With respect to researches ( I am not able to supply links now because this view is based on old times readings , but I am sure that such research findings can be found ) , people ( mostly ) uses a "primary" language for her/his profession and a "secondary" language for some her/his works as an additional tool . This shows that during teaching , this feature should be taken into consideration : Guide the students to discover which language she/he will prefer to use in much of her/his works , and attempt to teach that language in a "best" way to be used by the students in their profession . A similar approach should also be used for a "secondary" language . If a language is taught just for fun or whatever else other than being a possible candidate for "primary" or "secondary" is likely that , if it not a necessity for the learner , is only a waste of everything is involved . Mehmet Erol Sanliturk -- _______________________________________________ Lazarus mailing list Lazarus at lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: From mschnell at lumino.de Tue Oct 18 10:11:42 2016 From: mschnell at lumino.de (Michael Schnell) Date: Tue, 18 Oct 2016 10:11:42 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <6be99731f84dd3cd4176185537002d09.squirrel@gator3286.hostgator.com> References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <6be99731f84dd3cd4176185537002d09.squirrel@gator3286.hostgator.com> Message-ID: <5b803e46-0bab-f5d2-e5c2-64f1ac4c90ea@lumino.de> On 17.10.2016 21:05, Lars via Lazarus wrote: > The big issue with teaching using a RAD tool, is welding the program logic > into the onclick events, instead of decoupling the logic in separate > procedures that can be reused elsewhere. As you point out in the text this is as well a pro (easy fast solving of small unitary tasks) as a con (bad reusability, bad code when doing big projects). But as Learning of course starts with doing small unitary tasks RAD obviously is a great help to fight the FUD and prejudice the students might have regarding programming. Of course it's great to dedicate a (later) lesson to un-RAD-ing your code in order to be prepared for bigger tasks. -Michael From mschnell at lumino.de Tue Oct 18 10:19:50 2016 From: mschnell at lumino.de (Michael Schnell) Date: Tue, 18 Oct 2016 10:19:50 +0200 Subject: [Lazarus] Lazmint Message-ID: This Document http://www.freepascal.org/~michael/articles/lazmint/lazmint.pdf Wants to show that "This is not as scary or difficult as it may seem". Unfortunately the step wget $BASEURL/x84_64-linux/fpc-3.0.0.x64_64-linux.tar does not work (file not found). By wget $BASEURL/i386-linux/fpc-3.0.0.i386-linux.tar it is possible to install the 32 Bit version of fpc 3.0.0. Anyway: is 3.0.0. the decent version to use right now ? -Michael From jmlandmesser at gmx.de Tue Oct 18 10:46:59 2016 From: jmlandmesser at gmx.de (Landmesser John) Date: Tue, 18 Oct 2016 10:46:59 +0200 Subject: [Lazarus] Windows and german Umlauts: why do i have to PWideChar(UTF8Decode(String)) and not UTF8ToAnsi(String) In-Reply-To: <20161018093612.4d2a9552@limapholos.matflo.wg> References: <5805CC03.2030202@gmx.de> <20161018093612.4d2a9552@limapholos.matflo.wg> Message-ID: <5805E183.2060101@gmx.de> Am 18.10.2016 um 09:36 schrieb Mattias Gaertner via Lazarus: > That is NOT the same as PWideChar(UTF8Decode(String))? > Obviously, because one produces an 8-bit string and the other a 16-bit > string. How do you compare the result? I compare the results by open the *.csv file in Excel 2003 and see no correct "Grünberg" Note: my Editor "TextPad" shows "PC UTF8" as file encoding if i use UTF8ToAnsi. > What compiler version? Sorry, forgot that: Lazarus 1.7 latest trunk FPC 3.0.0 i386-win32-win32/win64 Windows XP > Are you using LazUTF8? Where to look for that? "Alle Dateien haben bereits die richtige Kodierung" -> UTF8 > What is your DefaultSystemCodePage? > > Mattias in Systemsettings language its: "Automatisch ( oder Englisch)" So the answer seems to be: "one produces an 8-bit string and the other a 16-bit " From mschnell at lumino.de Tue Oct 18 11:06:08 2016 From: mschnell at lumino.de (Michael Schnell) Date: Tue, 18 Oct 2016 11:06:08 +0200 Subject: [Lazarus] Lazmint In-Reply-To: References: Message-ID: Seemingly "make bigide" on a 64 Bit Mint does not work this simply with the 32 bit fpc: /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.8/crtbegin.o when searching for /usr/lib/gcc/x86_64-linux-gnu/4.8/crtbegin.o /usr/bin/ld: cannot find /usr/lib/gcc/x86_64-linux-gnu/4.8/crtbegin.o /usr/bin/ld: cannot find -ldl /usr/bin/ld: cannot find -lc Error: Error while linking -Michael From nc-gaertnma at netcologne.de Tue Oct 18 11:31:53 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Tue, 18 Oct 2016 11:31:53 +0200 Subject: [Lazarus] Windows and german Umlauts: why do i have to PWideChar(UTF8Decode(String)) and not UTF8ToAnsi(String) In-Reply-To: <5805E183.2060101@gmx.de> References: <5805CC03.2030202@gmx.de> <20161018093612.4d2a9552@limapholos.matflo.wg> <5805E183.2060101@gmx.de> Message-ID: <20161018113153.5f3b7b69@limapholos.matflo.wg> On Tue, 18 Oct 2016 10:46:59 +0200 Landmesser John via Lazarus wrote: > Am 18.10.2016 um 09:36 schrieb Mattias Gaertner via Lazarus: > > That is NOT the same as PWideChar(UTF8Decode(String))? > > Obviously, because one produces an 8-bit string and the other a 16-bit > > string. How do you compare the result? > > I compare the results by open the *.csv file in Excel 2003 and see no > correct "Grünberg" > Note: my Editor "TextPad" shows "PC UTF8" as file encoding if i use > UTF8ToAnsi. Did you start the csv file with the UTF8 BOM, so that Excel knows that the file is UTF-8 encoded? UTF8BOM = #$EF#$BB#$BF > > What compiler version? > > Sorry, forgot that: > > Lazarus 1.7 latest trunk FPC 3.0.0 i386-win32-win32/win64 > > Windows XP > > > Are you using LazUTF8? > > Where to look for that? LazUTF8 is a unit, that sets the global variable DefaultSystemCodePage to CP_UTF8. DefaultSystemCodePage defines the default encoding of AnsiString, so UTF8ToAnsi creates UTF-8. LazUTF8 is used by LCL applications. If unsure use writeln or use the debugger to find out the value of DefaultSystemCodePage. > "Alle Dateien haben bereits die richtige Kodierung" -> UTF8 > > > What is your DefaultSystemCodePage? > > > > Mattias > > in Systemsettings language its: "Automatisch ( oder Englisch)" > > > So the answer seems to be: > "one produces an 8-bit string and the other a 16-bit " And PWideChar is a pointer, while UT8ToAnsi creates a String. Mattias From juergen.hestermann at gmx.de Tue Oct 18 11:51:11 2016 From: juergen.hestermann at gmx.de (=?UTF-8?Q?J=c3=bcrgen_Hestermann?=) Date: Tue, 18 Oct 2016 11:51:11 +0200 Subject: [Lazarus] Windows and german Umlauts: why do i have to PWideChar(UTF8Decode(String)) and not UTF8ToAnsi(String) In-Reply-To: <20161018113153.5f3b7b69@limapholos.matflo.wg> References: <5805CC03.2030202@gmx.de> <20161018093612.4d2a9552@limapholos.matflo.wg> <5805E183.2060101@gmx.de> <20161018113153.5f3b7b69@limapholos.matflo.wg> Message-ID: <146b6af2-c7e1-e8bc-7772-fc4739bb822d@gmx.de> Am 2016-10-18 um 11:31 schrieb Mattias Gaertner via Lazarus: > Did you start the csv file with the UTF8 BOM, so that Excel knows that > the file is UTF-8 encoded? > UTF8BOM = #$EF#$BB#$BF In https://en.wikipedia.org/wiki/Comma-separated_values it says: "Also, many regional versions of Excel will not be able to deal with Unicode in CSV." and "One simple solution when encountering such difficulties is to change the filename extension from .csv to .txt; then opening the file from an already running Excel instance with the "Open" command, where the user can manually specify the delimiters, encoding, format of columns, etc." From mschnell at lumino.de Tue Oct 18 11:52:01 2016 From: mschnell at lumino.de (Michael Schnell) Date: Tue, 18 Oct 2016 11:52:01 +0200 Subject: [Lazarus] Lazmint In-Reply-To: References: Message-ID: So I fetched the current fpc from svn. Trying to make same I get a similar error: Linking fpmake fpmake.pp(47,1) Warning: "crti.o" not found, this will probably cause a linking failure fpmake.pp(47,1) Warning: "crtn.o" not found, this will probably cause a linking failure /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.8/crtbegin.o when searching for /usr/lib/gcc/x86_64-linux-gnu/4.8/crtbegin.o /usr/bin/ld: cannot find /usr/lib/gcc/x86_64-linux-gnu/4.8/crtbegin.o /usr/bin/ld: cannot find -lpthread /usr/bin/ld: cannot find -ldl /usr/bin/ld: cannot find -lc fpmake.pp(47,1) Error: Error while linking From mailinglists at geldenhuys.co.uk Tue Oct 18 12:01:34 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Tue, 18 Oct 2016 11:01:34 +0100 Subject: [Lazarus] Lazmint In-Reply-To: References: Message-ID: On 2016-10-18 09:19, Michael Schnell via Lazarus wrote: > wget $BASEURL/x84_64-linux/fpc-3.0.0.x64_64-linux.tar ^^^ That should probably read 'x86_64', not 'x64_64'. 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 nc-gaertnma at netcologne.de Tue Oct 18 12:10:10 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Tue, 18 Oct 2016 12:10:10 +0200 Subject: [Lazarus] Lazmint In-Reply-To: References: Message-ID: <20161018121010.6e259ba0@limapholos.matflo.wg> On Tue, 18 Oct 2016 10:19:50 +0200 Michael Schnell via Lazarus wrote: > This Document > > http://www.freepascal.org/~michael/articles/lazmint/lazmint.pdf > > Wants to show that "This is not as scary or difficult as it may seem". > > Unfortunately the step > > wget $BASEURL/x84_64-linux/fpc-3.0.0.x64_64-linux.tar The pdf has two typos. It should be wget $BASEURL/x86_64-linux/fpc-3.0.0.x86_64-linux.tar > Anyway: is 3.0.0. the decent version to use right now ? Yes. Mattias From info at voiceliveeditor.com Tue Oct 18 12:12:10 2016 From: info at voiceliveeditor.com (info at voiceliveeditor.com) Date: Tue, 18 Oct 2016 11:12:10 +0100 Subject: [Lazarus] Creating a component Guide ? Message-ID: Hi Is there a guide to creating my own component ( s ), I am thinking of creating a knob / slide bar component that uses an imagelist as its animation. Is there such a guide? Thanks Josh -------------------------------------------------------------------------------- This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify info at voiceliveeditor.com. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. Voiceliveeditor.com accepts no liability for the content of this email, or for the consequences of any actions taken on the basis of the information provided. -------------------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From mschnell at lumino.de Tue Oct 18 12:39:30 2016 From: mschnell at lumino.de (Michael Schnell) Date: Tue, 18 Oct 2016 12:39:30 +0200 Subject: [Lazarus] Lazmint In-Reply-To: References: Message-ID: On 18.10.2016 12:01, Graeme Geldenhuys via Lazarus wrote: > > That should probably read 'x86_64', not 'x64_64'. Works ! I could successfully compile and run as well fpc 3.1.1 (from svn) as Lazarus. Thanks, -Michael (aka docu beta tester) From jmlandmesser at gmx.de Tue Oct 18 12:40:59 2016 From: jmlandmesser at gmx.de (Landmesser John) Date: Tue, 18 Oct 2016 12:40:59 +0200 Subject: [Lazarus] Windows and german Umlauts: why do i have to PWideChar(UTF8Decode(String)) and not UTF8ToAnsi(String) In-Reply-To: <146b6af2-c7e1-e8bc-7772-fc4739bb822d@gmx.de> References: <5805CC03.2030202@gmx.de> <20161018093612.4d2a9552@limapholos.matflo.wg> <5805E183.2060101@gmx.de> <20161018113153.5f3b7b69@limapholos.matflo.wg> <146b6af2-c7e1-e8bc-7772-fc4739bb822d@gmx.de> Message-ID: <5805FC3B.8040603@gmx.de> Thanks guys for your effort ... i stay with PWideChar(UTF8Decode(String)) that works for me :-)) At the moment there is no need to know the details of character encoding history in computer science. From m.e.sanliturk at gmail.com Tue Oct 18 12:42:47 2016 From: m.e.sanliturk at gmail.com (Mehmet Erol Sanliturk) Date: Tue, 18 Oct 2016 03:42:47 -0700 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <6be99731f84dd3cd4176185537002d09.squirrel@gator3286.hostgator.com> Message-ID: On Tue, Oct 18, 2016 at 12:48 AM, Travis Ayres wrote: > I'm all for this effort, and hope it leads to new and modern tutorials, > books or notes that would be useful for others that use FreePascal/Lazarus > to convey graphical system interactions. If there's any need to proofread > such materials, I'll gladly help out! > > To test a large program , I want to use Petri Nets to drive the testing steps in an information processing , let's say network , to simulate a business environment : https://en.wikipedia.org/wiki/Petri_net ( Petri net ) https://en.wikipedia.org/wiki/Category:Petri_nets Category:Petri nets ( My work on this is "Perhaps" now ... ) One unfortunate situation is that there is not much Pascal software for Petri Nets processing , except the following ( which its license is very ambiguous means not usable ) and may be considered very old with respect to new Pascal language level : http://staff.um.edu.mt/jskl1/petrisim/ PetriSim - Discrete Simulation Environment There are others , perhaps , but again , not usable very well . Petri Nets are a vast subject now . There are some Petri Nets processing software but their licenses being copy left are not friendly for commercial environment . For event driven systems , Petri Nets are very important . My opinion is that a "good" , "permissively" licensed , as much as general purpose Petri Nets simulation software may be a very useful tool for the students to simulate their event driven system definition , and , then write its special purpose Pascal program by using Lazarus easily . Actually , it is not compulsory to use Pascal , but Pascal will supply the Pascal programming language learners a very good example , its license will permit them to use some of its parts whatever they want to do without any hostile restriction in any environment . In such a tool , only it is necessary to describe the nodes , information flow between nodes , etc. . ( Please see above link about PetriSim . ) Mehmet Erol Sanliturk > On Oct 17, 2016 6:32 PM, "Mehmet Erol Sanliturk via Lazarus" < > lazarus at lists.lazarus-ide.org> wrote: > > > > On Mon, Oct 17, 2016 at 12:05 PM, Lars via Lazarus < > lazarus at lists.lazarus-ide.org> wrote: > >> > On 14/10/16 08:30, Michael Schnell via Lazarus wrote: >> > >> > >> > Of course there are decent drawbacks regarding relying too much on RAD >> > and about not really understanding the fundamentals behind it. But in >> the >> > end the addressees are non-computer engineers. >> >> The big issue with teaching using a RAD tool, is welding the program logic >> into the onclick events, instead of decoupling the logic in separate >> procedures that can be reused elsewhere. RAD tools are superior at >> prototyping... I can't believe how awesome they are at that. They are >> inferior, however, when it comes to bad habits being brought on. With >> this warning, RAD tools can still be very useful for writing solid >> programs, as long as one knows this warning ahead of time. >> >> When I first learned delphi I made the mistake of putting code in the >> onClick events and similar, and then when you expand your app later you >> realize all that code is welded in place and cannot be reused outside of >> the events. >> >> Of course decoupling the logic from the GUI leads to more layers of code. >> >> > ------------- > > > > >> How I got rid of my bad habits when I first learned delphi: I started >> writing console apps with no object oriented programming, no events, and >> learned that not everything is a click event in computer programming. >> >> > > ------------- > > > My opinion is that the above ideas are really very good to be applied > during teaching : > First , teach language on , let's say , "atomic" problems . Then , use > these "atomic" concepts in further problems either embedded in a GUI or > console program . > > One obvious point is that an "event" driven programming knowledge is a > must to become a competent programmer . The problem is how this can be > learned . Without knowing how to program an algorithm when a related event > is occurred , will bring any one to nothing means ( not to a success ) . > > ------------- > > > >> People late in the game (learned programming when GUI's were available) >> and have no experience with console mode apps will earn some bad habits >> because of the GUI oriented programming. Those with experience in other >> areas of programming such as old Dos programs, web programs (basically >> like a dos or unix console program) will learn different ways of >> organizing code without everything being tied to a GUI event driven code. >> >> I suppose even doing a plain Win32 API app with no delphi code (pure win >> api) would help someone learn how to organize code from a second opinion >> view, without being forced to use the event driven system you were given >> by the RAD tool. >> >> > > ------------- > > > >> Of course, also learning other programming languages helps (although, IMO >> learning too many brain dead languages and hip cool ones will not help, as >> much as others claim... Basic programmers from the 80's or 70's still >> think in GOTO's and line numbers) >> -- >> > > > ------------- > > > > With respect to researches ( I am not able to supply links now because > this view is based on old times readings , but I am sure that such research > findings can be found ) , > > people ( mostly ) uses a "primary" language for her/his profession and a > "secondary" language for some her/his works as an additional tool . > > This shows that during teaching , this feature should be taken into > consideration : Guide the students to discover which language she/he will > prefer to use in much of her/his works , and attempt to teach that language > in a "best" way to be used by the students in their profession . > > A similar approach should also be used for a "secondary" language . > > If a language is taught just for fun or whatever else other than being a > possible candidate for "primary" or "secondary" is likely that , if it not > a necessity for the learner , is only a waste of everything is involved . > > > > Mehmet Erol Sanliturk > > > > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.e.sanliturk at gmail.com Tue Oct 18 12:53:12 2016 From: m.e.sanliturk at gmail.com (Mehmet Erol Sanliturk) Date: Tue, 18 Oct 2016 03:53:12 -0700 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <5b803e46-0bab-f5d2-e5c2-64f1ac4c90ea@lumino.de> References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <6be99731f84dd3cd4176185537002d09.squirrel@gator3286.hostgator.com> <5b803e46-0bab-f5d2-e5c2-64f1ac4c90ea@lumino.de> Message-ID: On Tue, Oct 18, 2016 at 1:11 AM, Michael Schnell via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > On 17.10.2016 21:05, Lars via Lazarus wrote: > >> The big issue with teaching using a RAD tool, is welding the program logic >> into the onclick events, instead of decoupling the logic in separate >> procedures that can be reused elsewhere. >> > As you point out in the text this is as well a pro (easy fast solving of > small unitary tasks) as a con (bad reusability, bad code when doing big > projects). > > But as Learning of course starts with doing small unitary tasks RAD > obviously is a great help to fight the FUD and prejudice the students might > have regarding programming. > > Of course it's great to dedicate a (later) lesson to un-RAD-ing your code > in order to be prepared for bigger tasks. > > -Michael > > -- > _______________________________________________ > Order of teaching is not so critical : As you say , write a GUI program for events : Say : "Now it is necessary to define what will be done for the events ? ... Its way is the following : Write your program parts in that way ..." My application was like the following ( as a very simple example ) : Pose a problem "Display your name ." After this is done : "Display your name 10 times ." The students were not able to write their programs . Then , solution was "You should use a loop ." "A loop is defined in the following ways : ... " Such an approach is used frequently in Mathematics text books : Subject text . Problems .. Last problems were "Unsolvable" with the above text . Solution : "Read the next chapter ..." ..................... Such approaches are "the Art of Teaching" ... Mehmet Erol Sanliturk -------------- next part -------------- An HTML attachment was scrubbed... URL: From mailinglists at geldenhuys.co.uk Tue Oct 18 13:06:33 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Tue, 18 Oct 2016 12:06:33 +0100 Subject: [Lazarus] ANN: Procedure List enhancement Message-ID: Hi, I thought I would mention that Markus implemented an enhanced search feature in the Procedure List dialog. This became available at the end of July in Lazarus Trunk. I've used it extensively since then, and it is super handy. So kudos to Markus for than very nice addition. So what is the new enhancement? Before, you could only search and match against method/procedure names, and use the Objects combobox to limit the search to a specific class. The new enhancement allows you to search against any class names as well as method/procedure names. All from the same search edit text box. Search Syntax: -------------- 1. Simply typing some text will match against the method/procedure name as it has always done. 2. A . (dot) in the filter word is used to separate class name and function name. Search Samples: --------------- class/method name | filter | match ========================================= TForm1.TestProc | test | true TForm1.TestProc | form | true TForm1.TestProc | .tes | true (the filter is only applied to the method names) TestProc2 | .tes | false (because this is a procedure, not a method of a class) TForm1.TestProc | for.pro | true (class contains "for", method contains "pro") So if you have very large units, this extra search functionality really comes into play, and hugely improves the speed at which you can find a method of a specific class, even though there are stacks of classes and methods defined in that unit. Anyway, I just thought I would share this very useful feature with you all. 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 vojtech.cihak at atlas.cz Tue Oct 18 13:37:24 2016 From: vojtech.cihak at atlas.cz (=?utf-8?q?Vojt=C4=9Bch_=C4=8Cih=C3=A1k?=) Date: Tue, 18 Oct 2016 13:37:24 +0200 Subject: [Lazarus] =?utf-8?q?Creating_a_component_Guide_=3F?= In-Reply-To: 00000000659d0001387c00f15035 References: 00000000659d0001387c00f15035 Message-ID: <20161018133724.A2CA7059@atlas.cz> Yes, see:   http://wiki.freepascal.org/How_To_Write_Lazarus_Component   V. ______________________________________________________________ > Od: Josh via Lazarus > Komu: "Lazarus mailing list" > Datum: 18.10.2016 12:12 > Předmět: [Lazarus] Creating a component Guide ? > Hi Is there a guide to creating my own component ( s ), I am thinking of creating a knob / slide bar component that uses an imagelist as its animation. Is there such a guide? Thanks JoshThis email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify info at voiceliveeditor.com. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. Voiceliveeditor.com accepts no liability for the content of this email, or for the consequences of any actions taken on the basis of the information provided. ---------- -- _______________________________________________ Lazarus mailing list Lazarus at lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: From mailinglists at geldenhuys.co.uk Tue Oct 18 14:17:03 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Tue, 18 Oct 2016 13:17:03 +0100 Subject: [Lazarus] Trunk - Index Out Of Bounds error Message-ID: <78bb4836-4390-b4f1-de28-9b3cc11ff9ba@geldenhuys.co.uk> Hi, I've just upgraded to Lazarus Trunk. If I now add a package dependency to my project I get an index out of bounds error. I don't see the package add - in the Project Inspector window either, but apparently it is there. If I quit and restart Lazarus IDE, then the package dependency magically appears. I'm using Lazarus 1.7 r53133 FPC 2.6.4 x86_64-freebsd-gtk 2 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 juergen.hestermann at gmx.de Tue Oct 18 15:23:01 2016 From: juergen.hestermann at gmx.de (=?UTF-8?Q?J=c3=bcrgen_Hestermann?=) Date: Tue, 18 Oct 2016 15:23:01 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <6be99731f84dd3cd4176185537002d09.squirrel@gator3286.hostgator.com> <5b803e46-0bab-f5d2-e5c2-64f1ac4c90ea@lumino.de> Message-ID: <69bc7829-9b5c-debd-5794-581b701eba21@gmx.de> Am 2016-10-18 um 12:53 schrieb Mehmet Erol Sanliturk via Lazarus: > Order of teaching is not so critical : As you say , write a GUI program for events : Say : "Now it is necessary to define what will be done for the events ? ... Its way is the following : Write your program parts in that way ..." IMO the order is extremly important! If you start with the fundamental informations (how does the processor work in general, how are variables stored (stack/heap/etc.), what does the processor do in loops, etc.) then this information is remembered very well because everybody can imagine what goes on in general. You can *predict* what will (should) happen in your program. If you just start with clicking you do not know *why* it works (if it works) nor do you know *why* it does not work (if it does not do so). They would always need someone at hand with exprience to tell them how to continue. This can be very frustrating for studends. Therefore I would always present at least a rough overview about procedural programming before starting with objects and events. In the end, the latter is still processed in a procedural manner which every programmer should know. > My application was like the following ( as a very simple example ) : > Pose a problem "Display your name ." > After this is done : > "Display your name 10 times ." > The students were not able to write their programs . Then , solution was > "You should use a loop ." > "A loop is defined in the following ways : ... " > Such an approach is used frequently in Mathematics text books : > Subject text . > Problems .. > Last problems were "Unsolvable" with the above text . > Solution : > "Read the next chapter ..." > Such approaches are "the Art of Teaching" ... IMO this "approach" has a severe drawback: The students do not get an overall picture of what *can* be done and *how* it can be done. If they do not know about loops how should they know that they exist? They would need to read *everything* that is available and hope to find something helpful. That is very frustrating and can lead to suboptimal solutions because they get tired of reading yet another chapter and instead use something else (like copying the code in the editor 10 times). From lacak at zoznam.sk Tue Oct 18 15:52:57 2016 From: lacak at zoznam.sk (LacaK) Date: Tue, 18 Oct 2016 15:52:57 +0200 Subject: [Lazarus] ActiveX, TOLEControl Message-ID: <89ca3774-acbe-d663-a909-23cd488f0eff@zoznam.sk> Hi *, I need help with OCX component (not visual I guess), which I need use in Lazarus application (to control another application, which supplies this OCX control). I have imported type library using importtl.exe (new unit was created successfully) Then in program I have created instance: v := CreateOleObject('SCAPS.ScSamlightClientCtrl'); or intf := CreateComObject(CLASS_ScSamlightClientCtrl) as _DSamlight_client_ctrl_ocx; But all next attampts using any interface method fail with EOleSysError "Catastrophic failure" (ErrorCode=-2147418113) In Delphi it works, but only when I use TOLEControl descendant created by Delphi's import of ActiveX (into _TLB unit) In Delphi I have : TScSamlightClientCtrl = class(TOleControl) ... but in Lazarus I have no equivalent? (When I Delphi I do same as in Lazarus I get same error also in Delphi) I do not know exacly what to ask here ? What is purpose of TOleControl and what TOleControl did more than I can do in Lazarus ? Can I somehow workaround it in Lazarus ? In short what I have imported from type lib in Lazarus is interface: _DSamlight_client_ctrl_ocx = dispinterface ['{05D31AA6-1306-4DA0-9AE2-A8771FF6FA94}'] function ScIsRunning:Integer;dispid 1; ... etc. end; and CoClass: Class Function CoScSamlightClientCtrl.Create: _DSamlight_client_ctrl_ocx; begin Result := CreateComObject(CLASS_ScSamlightClientCtrl) as _DSamlight_client_ctrl_ocx; end; I can create instance calling CoScSamlightClientCtrl.Create, but as I wrote I can not use any method ... Can somebody give any help ? Thanks -Laco. From m.e.sanliturk at gmail.com Tue Oct 18 16:38:40 2016 From: m.e.sanliturk at gmail.com (Mehmet Erol Sanliturk) Date: Tue, 18 Oct 2016 07:38:40 -0700 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <69bc7829-9b5c-debd-5794-581b701eba21@gmx.de> References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <6be99731f84dd3cd4176185537002d09.squirrel@gator3286.hostgator.com> <5b803e46-0bab-f5d2-e5c2-64f1ac4c90ea@lumino.de> <69bc7829-9b5c-debd-5794-581b701eba21@gmx.de> Message-ID: On Tue, Oct 18, 2016 at 6:23 AM, Jürgen Hestermann via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > Am 2016-10-18 um 12:53 schrieb Mehmet Erol Sanliturk via Lazarus: > > Order of teaching is not so critical : As you say , write a GUI program > for events : Say : "Now it is necessary to define what will be done for the > events ? ... Its way is the following : Write your program parts in that > way ..." > > IMO the order is extremly important! > If you start with the fundamental informations > (how does the processor work in general, > how are variables stored (stack/heap/etc.), > what does the processor do in loops, etc.) > then this information is remembered very well > because everybody can imagine what goes on in general. > You can *predict* what will (should) happen in your program. > > If you just start with clicking you do not know *why* it works > (if it works) nor do you know *why* it does not work (if it does not do > so). > They would always need someone at hand with exprience to tell them how > to continue. This can be very frustrating for studends. > > Therefore I would always present at least a rough overview about procedural > programming before starting with objects and events. In the end, the latter > is still processed in a procedural manner which every programmer should > know. > > > > My application was like the following ( as a very simple example ) : > > Pose a problem "Display your name ." > > After this is done : > > "Display your name 10 times ." > > The students were not able to write their programs . Then , solution was > > "You should use a loop ." > > "A loop is defined in the following ways : ... " > > Such an approach is used frequently in Mathematics text books : > > Subject text . > > Problems .. > > Last problems were "Unsolvable" with the above text . > > Solution : > > "Read the next chapter ..." > > Such approaches are "the Art of Teaching" ... > > IMO this "approach" has a severe drawback: > The students do not get an overall picture of what > *can* be done and *how* it can be done. > If they do not know about loops how should they > know that they exist? They would need to read *everything* > that is available and hope to find something helpful. > That is very frustrating and can lead to suboptimal solutions > because they get tired of reading yet another chapter and > instead use something else (like copying the code in the editor 10 times). > > -- > _______________________________________________ > I have said that "the Art of Teaching" ... Assume that a course is designed by a department , and you are the instructor . For example : Course X : Programming using Lazarus Course outline is the Lazarus components . What can you do ? "I am resigning because this course is not well designed ." or "I am changing the course outline as I want ." ( which you do not have authority to do that ) . or "Lazarus is this ... The following parts are necessary to learn to use when you click ... ( here you will teach what is required which yo described above ... ) " Please select an appropriate one . If you are the designer of the courses you are right what to do . Problem arises when you are not course designer but an instructor of it . Then you need to use "the Art of Teaching" with your "the Science of Teaching" . Mehmet Erol Sanliturk -------------- next part -------------- An HTML attachment was scrubbed... URL: From mschnell at lumino.de Tue Oct 18 16:47:07 2016 From: mschnell at lumino.de (Michael Schnell) Date: Tue, 18 Oct 2016 16:47:07 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <69bc7829-9b5c-debd-5794-581b701eba21@gmx.de> References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <6be99731f84dd3cd4176185537002d09.squirrel@gator3286.hostgator.com> <5b803e46-0bab-f5d2-e5c2-64f1ac4c90ea@lumino.de> <69bc7829-9b5c-debd-5794-581b701eba21@gmx.de> Message-ID: <0d466493-3a52-0b38-503e-ee5372e48f73@lumino.de> On 18.10.2016 15:23, Jürgen Hestermann via Lazarus wrote: > > IMO the order is extremly important! > If you start with the fundamental informations > (how does the processor work in general, > how are variables stored (stack/heap/etc.), > what does the processor do in loops, etc.) > then this information is remembered very well > because everybody can imagine what goes on in general. > You can *predict* what will (should) happen in your program. IMO the order is extremely important! If you start with complex stuff that does not yield immediate success (i.e. a working program that does something that might be useful) The students will loose interest and run away, unless they are nerds like ourselves. -Michael From juergen.hestermann at gmx.de Tue Oct 18 17:16:54 2016 From: juergen.hestermann at gmx.de (=?UTF-8?Q?J=c3=bcrgen_Hestermann?=) Date: Tue, 18 Oct 2016 17:16:54 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <0d466493-3a52-0b38-503e-ee5372e48f73@lumino.de> References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <6be99731f84dd3cd4176185537002d09.squirrel@gator3286.hostgator.com> <5b803e46-0bab-f5d2-e5c2-64f1ac4c90ea@lumino.de> <69bc7829-9b5c-debd-5794-581b701eba21@gmx.de> <0d466493-3a52-0b38-503e-ee5372e48f73@lumino.de> Message-ID: <8430a9a8-115c-3eaa-296a-74708b42ee93@gmx.de> Am 2016-10-18 um 16:47 schrieb Michael Schnell via Lazarus: > If you start with complex stuff that does not yield immediate success (i.e. a working program that does something that might be useful) The students will loose interest and run away, unless they are nerds like ourselves. Yes, therefore start with simple procedural (console) programs that let them have immediate success with all the elementary things that a program consists of (variables/types, loops, commands, etc.). If that is understood you can switch to GUI applications. If you do it the other way round you only delay the date of frustration but you do not avoid it. From bartjunk64 at gmail.com Tue Oct 18 23:44:32 2016 From: bartjunk64 at gmail.com (Bart) Date: Tue, 18 Oct 2016 23:44:32 +0200 Subject: [Lazarus] Windows and german Umlauts: why do i have to PWideChar(UTF8Decode(String)) and not UTF8ToAnsi(String) In-Reply-To: <5805CC03.2030202@gmx.de> References: <5805CC03.2030202@gmx.de> Message-ID: On 10/18/16, Landmesser John via Lazarus wrote: > But UTF8ToAnsi(String) fails. Maybe Utf8ToWinCP(AString) helps? It's in unit LazUtf8. Bart From dec12 at avidsoft.com.hk Wed Oct 19 11:21:25 2016 From: dec12 at avidsoft.com.hk (Dennis) Date: Wed, 19 Oct 2016 17:21:25 +0800 Subject: [Lazarus] ActiveX, TOLEControl In-Reply-To: <89ca3774-acbe-d663-a909-23cd488f0eff@zoznam.sk> References: <89ca3774-acbe-d663-a909-23cd488f0eff@zoznam.sk> Message-ID: <58073B15.60909@avidsoft.com.hk> LacaK via Lazarus wrote: > Hi *, > > I need help with OCX component (not visual I guess), which I need use > in Lazarus application (to control another application, which supplies > this OCX control). > I have imported type library using importtl.exe (new unit was created > successfully) > > Then in program I have created instance: > v := CreateOleObject('SCAPS.ScSamlightClientCtrl'); > or > intf := CreateComObject(CLASS_ScSamlightClientCtrl) as > _DSamlight_client_ctrl_ocx; What is the type of your V or intf variable? I am wild guessing maybe they are not proper referenced type so the object is created and then immediately freed. I would try v : OLEVariant; or V : _DSamlight_client_ctrl_ocx; Dennis From nc-gaertnma at netcologne.de Wed Oct 19 12:36:41 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Wed, 19 Oct 2016 12:36:41 +0200 Subject: [Lazarus] Trunk - Index Out Of Bounds error In-Reply-To: <78bb4836-4390-b4f1-de28-9b3cc11ff9ba@geldenhuys.co.uk> References: <78bb4836-4390-b4f1-de28-9b3cc11ff9ba@geldenhuys.co.uk> Message-ID: <20161019123641.677c9d0f@limapholos.matflo.wg> On Tue, 18 Oct 2016 13:17:03 +0100 Graeme Geldenhuys via Lazarus wrote: > Hi, > > I've just upgraded to Lazarus Trunk. If I now add a package dependency > to my project I get an index out of bounds error. I don't see the > package add - in the Project Inspector window either, but apparently it > is there. If I quit and restart Lazarus IDE, then the package dependency > magically appears. > > I'm using Lazarus 1.7 r53133 FPC 2.6.4 x86_64-freebsd-gtk 2 It works here with FPC 3.0. Maybe happens only with FPC 2.6.4. Mattias From lacak at zoznam.sk Wed Oct 19 14:01:40 2016 From: lacak at zoznam.sk (LacaK) Date: Wed, 19 Oct 2016 14:01:40 +0200 Subject: [Lazarus] ActiveX, TOLEControl In-Reply-To: <58073B15.60909@avidsoft.com.hk> References: <89ca3774-acbe-d663-a909-23cd488f0eff@zoznam.sk> <58073B15.60909@avidsoft.com.hk> Message-ID: <461cdd29-32ba-da33-5cb5-bb6dbf5c713e@zoznam.sk> > > >> Hi *, >> >> I need help with OCX component (not visual I guess), which I need use >> in Lazarus application (to control another application, which >> supplies this OCX control). >> I have imported type library using importtl.exe (new unit was created >> successfully) >> >> Then in program I have created instance: >> v := CreateOleObject('SCAPS.ScSamlightClientCtrl'); >> or >> intf := CreateComObject(CLASS_ScSamlightClientCtrl) as >> _DSamlight_client_ctrl_ocx; > What is the type of your V or intf variable? V: OLEVariant; intf: _DSamlight_client_ctrl_ocx; > I am wild guessing maybe they are not proper referenced type so the > object is created and then immediately freed. There is something strange behind scene. I have tried various methods: var v1: OLEVariant; v2: ScSamlightClientCtrl; v: variant; ax: TActiveXContainer; disp: IDispatch; i: integer; begin v1 := CreateOLEObject('SCAPS.ScSamlightClientCtrl'); i := v1.scIsRunning; // exception here v2 := CoScSamlightClientCtrl.Create; i := v2.scIsRunning; // exception here ax := TActiveXContainer.Create(Self); //ax.OleClassName := 'SCAPS.ScSamlightClientCtrl'; CoCreateInstance(CLASS_ScSamlightClientCtrl, nil, CLSCTX_INPROC_SERVER or CLSCTX_LOCAL_SERVER, IDispatch, disp); ax.ComServer:=disp; ax.Active := True; v := disp; i := v.scIsRunning; // exception here So in every case it returns exception when I try call first time interface method ... I am not familiar with ActiveX technology so I have no idea what is wrong ? -Laco. From dec12 at avidsoft.com.hk Wed Oct 19 18:07:35 2016 From: dec12 at avidsoft.com.hk (Dennis) Date: Thu, 20 Oct 2016 00:07:35 +0800 Subject: [Lazarus] ActiveX, TOLEControl In-Reply-To: <461cdd29-32ba-da33-5cb5-bb6dbf5c713e@zoznam.sk> References: <89ca3774-acbe-d663-a909-23cd488f0eff@zoznam.sk> <58073B15.60909@avidsoft.com.hk> <461cdd29-32ba-da33-5cb5-bb6dbf5c713e@zoznam.sk> Message-ID: <58079A47.1000507@avidsoft.com.hk> LacaK via Lazarus wrote: > >> >> >>> Hi *, >>> >>> I need help with OCX component (not visual I guess), which I need >>> use in Lazarus application (to control another application, which >>> supplies this OCX control). >>> I have imported type library using importtl.exe (new unit was >>> created successfully) >>> >>> Then in program I have created instance: >>> v := CreateOleObject('SCAPS.ScSamlightClientCtrl'); >>> or >>> intf := CreateComObject(CLASS_ScSamlightClientCtrl) as >>> _DSamlight_client_ctrl_ocx; >> What is the type of your V or intf variable? > > V: OLEVariant; > intf: _DSamlight_client_ctrl_ocx; > >> I am wild guessing maybe they are not proper referenced type so the >> object is created and then immediately freed. > > There is something strange behind scene. I have tried various methods: I remember in Delphi, I sometimes have to call CoInitialize and CoUninitialize. Not sure if FPC has to do the same. Have you tried that? Dennis From nc-gaertnma at netcologne.de Wed Oct 19 23:53:33 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Wed, 19 Oct 2016 23:53:33 +0200 Subject: [Lazarus] New methods code creation In-Reply-To: <1474920269.1695994.737677385.21B3E9E2@webmail.messagingengine.com> References: <1474898460.2390332.737183681.48812426@webmail.messagingengine.com> <2d5600ec-62fb-2ace-3144-ed143fb40473@kluug.net> <20160926184503.523fa263@limapholos.matflo.wg> <3c83d28b-75c5-2557-cf7f-8c1bb75c3212@kluug.net> <1474909800.936520.737490361.65476419@webmail.messagingengine.com> <6b8b4daf-acad-7474-77f0-73b20cac1ffe@kluug.net> <1474913175.1666611.737547521.3F86BA55@webmail.messagingengine.com> <20160926202438.242e3f89@limapholos.matflo.wg> <792ea6b4-d872-3b93-f2dd-97020980dd73@kluug.net> <1474920269.1695994.737677385.21B3E9E2@webmail.messagingengine.com> Message-ID: <20161019235333.4177ecec@limapholos.matflo.wg> On Mon, 26 Sep 2016 13:04:29 -0700 Aradeonas via Lazarus wrote: > > I personally prefer to use private as default. I will add the option. > > Me too, at least an option for an useful shortcut. > Happy to hear that. I added it. Mattias From lacak at zoznam.sk Thu Oct 20 10:37:03 2016 From: lacak at zoznam.sk (LacaK) Date: Thu, 20 Oct 2016 10:37:03 +0200 Subject: [Lazarus] ActiveX, TOLEControl In-Reply-To: <58079A47.1000507@avidsoft.com.hk> References: <89ca3774-acbe-d663-a909-23cd488f0eff@zoznam.sk> <58073B15.60909@avidsoft.com.hk> <461cdd29-32ba-da33-5cb5-bb6dbf5c713e@zoznam.sk> <58079A47.1000507@avidsoft.com.hk> Message-ID: <7ba41406-fe03-0a11-66f2-64c6684c18c5@zoznam.sk> > >>> >>>> >>>> I need help with OCX component (not visual I guess), which I need >>>> use in Lazarus application (to control another application, which >>>> supplies this OCX control). >>>> I have imported type library using importtl.exe (new unit was >>>> created successfully) >>>> >>>> Then in program I have created instance: >>>> v := CreateOleObject('SCAPS.ScSamlightClientCtrl'); >>>> or >>>> intf := CreateComObject(CLASS_ScSamlightClientCtrl) as >>>> _DSamlight_client_ctrl_ocx; >>> What is the type of your V or intf variable? >> >> V: OLEVariant; >> intf: _DSamlight_client_ctrl_ocx; >> >>> I am wild guessing maybe they are not proper referenced type so the >>> object is created and then immediately freed. >> >> There is something strange behind scene. I have tried various methods: > I remember in Delphi, I sometimes have to call CoInitialize and > CoUninitialize. > Not sure if FPC has to do the same. > Have you tried that? > I did debuging in Delphi looking at what is called and I have found, that when I add two other lines it works!: var Unknown: IUnknown; PersistStreamInit: IPersistStreamInit; begin Unknown := CreateComObject(CLASS_ScSamlightClientCtrl); // these two lines are necessary: OleCheck(Unknown.QueryInterface(IPersistStreamInit, PersistStreamInit)); OleCheck(PersistStreamInit.InitNew); FSamlightClientCtrl := Unknown as ScSamlightClientCtrl; ... end; I have no idea why they are needed, but may be that they perform some initialization of component ... I also wonder if other users can suffer from it ? -Laco. From nc-gaertnma at netcologne.de Thu Oct 20 22:38:16 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Thu, 20 Oct 2016 22:38:16 +0200 Subject: [Lazarus] Watch List shows absolute rubbish In-Reply-To: <4449fdcc-a9ea-558c-61b5-ce0f16ec32c1@geldenhuys.co.uk> References: <07f10d38-64d8-69c5-810a-b85dd96a301c@geldenhuys.co.uk> <5448acbc-e767-f0cb-db5b-d111ba53ca17@geldenhuys.co.uk> <847e9ed3-a420-0926-33e2-19124e1f1b8b@mfriebe.de> <02bcebd6-55e5-1ceb-e26c-6108abbbcf2e@geldenhuys.co.uk> <4449fdcc-a9ea-558c-61b5-ce0f16ec32c1@geldenhuys.co.uk> Message-ID: <20161020223816.0b21940e@limapholos.matflo.wg> On Fri, 14 Oct 2016 23:09:38 +0100 Graeme Geldenhuys via Lazarus wrote: >[...] > I finally found the cause of the problem. I don’t use build modes in > Lazarus, so only ever looked at the “Project Options -> Compiler Options > -> Compilation and Linking” screen. That’s where I set the -O- option, > and I also set other debugging options in the “Compiler Options -> > Debugging” screen, like the -gl and -gh options. > > What I didn’t realize was that inside “Compiler Options -> Additions and > Overrides”, there was a “Stored in IDE” custom option (there are > actually a few defined), and one of the active options was -O2. And that > optimisation option is what caused all the trouble. > > Lovely conflicting options with no warning. The IDE now warns. Note that they are not "conflicting". Overriding a flag is a common thing. Mattias From gaborboros at yahoo.com Fri Oct 21 09:03:19 2016 From: gaborboros at yahoo.com (Gabor Boros) Date: Fri, 21 Oct 2016 09:03:19 +0200 Subject: [Lazarus] How to use strings properly with fixes_1_6 and FPC 3.0.0? Message-ID: <435f528d-260c-ff77-aa0c-c4dded0ec5cd@yahoo.com> Hi All, In the past I used Length, Pos, Delete, for i:=1 to Length(s) do s[i]... and realized yesterday these practices are wrong. But I do not know what the right practice. Found UTF8* on "LCL Unicode Support" wiki page, later {$Codepage UTF8} on "Better Unicode Support in Lazarus". The result of below lines: 2 2 1 1 With {$Codepage UTF8}: 2 1 1 1 I see same results with Linux and Windows. UTF8* is good to me but a compiler directive is easier to use, just don't know why not working properly. What is the proper way to read through (character after character) the string if use UTF8* procedures? var s:String; begin s:='á'; Memo1.Lines.Add(IntToStr(Length(s))); Memo1.Lines.Add(IntToStr(Length('á'))); Memo1.Lines.Add(IntToStr(UTF8Length(s))); Memo1.Lines.Add(IntToStr(UTF8Length('á'))); Gabor From noreply at z505.com Fri Oct 21 09:04:30 2016 From: noreply at z505.com (Lars) Date: Fri, 21 Oct 2016 01:04:30 -0600 Subject: [Lazarus] Help System with Chromium Embedded component Message-ID: Hi, I have been experimenting with chromium embedded and the power is endless. It's like being able to write CGI programs but on the desktop with no server needing to be installed. I was thinking documentation for software could benefit from having a chromium embedded (or firefox embedded) system. The issue with static plain html documents is that they aren't really powerful like a full fledged .CHM system or .hlp system. But even chm and .hlp files are primitive, they are just basic, and 1990's technology. With chromium embedded it seems you can literally do anything you want: combine lazarus widgets with a web server like program, but without requiring a web server. I.e. you can output to the web browser just like a cgi program can, but no server side needed, it's all done on the client. To me this seems like the perfect help system tool as you'll get something far more powerful than a PDF file... you can highlight text using lazarus code and callback back to the browser, whereas PDF files are not so programmable and controllable with code. I don't even know if pdf is scriptable. The biggest issue with help documents is they are usually either static PDF files that are not in any way searchable like an online documentation on a web server.... or they are static html files without any power added to them, or they are chm files which are simple but not so powerful. It seems there is almost a mismatch where people want a PDF file but also want to use google for help. This leads to the help files not really being integrated into the app and people just end up using google to find help on their program. The way I see it is if there was a chromium embedded or firefox embedded help system you wouldn't need google as much, as you would have the documents on your client like in the old days with Delphi 5 and 6 when you just pressed F1 and it took you to the page. F1 local client help just like delphi could in fact be automated with chromium embedded the same way delphi had it with the old documentation system from the 1990's... but with chromium embedded, you get rich html help documents, not old html document style from 1990's.. As much as I love CHM/HLP file systems from Ms Winblows it seems that one could even develop a more powerful one with chromium embedded and callbacks back and forth to the component.... Now I haven't much looked into the current Lazarus help system or what people use for help systems in popular lazarus apps, but I'm posting this to the mailing list as an idea for anyone who wants to make a rich help system with a rich integrated help system. The issue with opening an html file in a browser for help, is that the person has to leave their application and then alt tab back to it, whereas a chromium embedded help system could be put right into the software itself not a separate browser application. And the issue with chm files as I see it, is they are a simple format from the 1990's with limitations (As much as I respect simple formats from long ago.. some help systems need to be richer) PDF files are indeed very rich documents but they lack programmability. For example F1 online (or rather offline local client) help like in Delphi 5 seems not possible, even though delphi 5 help is 1990's technology and pdf files are modern. There seems to be a mismatch here where you have fragmented help systems on modern software, and people end up basically abandoning help systems and instead just go on google and search. Maybe the old delphi 5 style F1 help system could be brought back, but with a modern flare: chromium html pages, with javascript possible too if absolutely necessary, to make them richer. But the cool thing about chromium embedded is you can avoid javascript by using fpc/lazarus code as callbacks instead of relying just on clunky javascript.. i.e. you can mix modern pascal code in with HTML to render, search, display, etc. So I'm not talking about just a help system for lazarus (the current one may be just fine) but a help system architecture for all software apps released in the future! Apps developed with lazarus, not just lazarus itself.. and apps developed with delphi and other tools. From noreply at z505.com Fri Oct 21 09:20:09 2016 From: noreply at z505.com (Lars) Date: Fri, 21 Oct 2016 01:20:09 -0600 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <5b803e46-0bab-f5d2-e5c2-64f1ac4c90ea@lumino.de> References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <6be99731f84dd3cd4176185537002d09.squirrel@gator3286.hostgator.com> <5b803e46-0bab-f5d2-e5c2-64f1ac4c90ea@lumino.de> Message-ID: On Tue, October 18, 2016 2:11 am, Michael Schnell via Lazarus wrote: > >> The big issue with teaching using a RAD tool, is welding the program >> logic into the onclick events, instead of decoupling the logic in >> separate procedures that can be reused elsewhere. > As you point out in the text this is as well a pro (easy fast solving of > small unitary tasks) as a con (bad reusability, bad code when doing big > projects) .... > > Of course it's great to dedicate a (later) lesson to un-RAD-ing your > code in order to be prepared for bigger tasks. > > -Michael > Agree, although one could even just start out teaching console mode programs before RAD, which I think is what many universities do... I remember seeing that they were still using turbo pascal in some courses in Canada at universities here. The issue with console mode programs is students see utterly no use for them. I remember when I was using dos as a little kid, I was introduced to basic, and I saw no use of it. GUI apps are of much more use to people as they are flashy and rich with widgets, whereas console mode programs seem utterly boring. I guess that's the difference between unix users and Windows users.. Unix users back in the old days saw console mode programs as huge thrills and a great experience. When I saw Dos programs when I was a kid I thought they were pathetic and useless, and it deterred me from programming. If I knew about delphi as a child I probably would have been more interested in programming. I remember trying visual basic and disliking the language keywords. I liked the visual basic tool since you could easily create widgets on forms, but I disliked the language itself. Visual basic also forms the exact same (if not worse) bad habits of welding code into click events and doing sloppy quick coding. From noreply at z505.com Fri Oct 21 09:38:04 2016 From: noreply at z505.com (Lars) Date: Fri, 21 Oct 2016 01:38:04 -0600 Subject: [Lazarus] Chromium embedded on freebsd or firefox embedded Message-ID: What is the actual status of chromium embedded and firefox embedded on bsd? Does it only work on Windows and Linux? Seems there is not so much info about CEF in general on freebsd other than this info: https://lists.freebsd.org/pipermail/freebsd-chromium/2014-January/001113.html I so much love the bsd license and want to move my desktop and some of my development over to BSD, but it just seems like bsd is constantly playing catch up to what linux and windows already had years ago. That's my biggest fear about all bsd's. Since I will be doing work with chromium embedded on multiple projects it will be interesting to know what the status of it is on bsd for lazarus? From noreply at z505.com Fri Oct 21 09:51:38 2016 From: noreply at z505.com (Lars) Date: Fri, 21 Oct 2016 01:51:38 -0600 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <6be99731f84dd3cd4176185537002d09.squirrel@gator3286.hostgator.com> Message-ID: <2abdc7c528d89aa16e535d0d6677e61a.squirrel@gator3286.hostgator.com> On Mon, October 17, 2016 7:32 pm, Mehmet Erol Sanliturk wrote: > One obvious point is that an "event" driven programming knowledge is a > must to become a competent programmer . The problem is how this can be > learned . Without knowing how to program an algorithm when a related event > is occurred , will bring any one to nothing means ( not to a success ) . > An interesting question is what is an event and isn't in some way or another all programming based on events that occur? The concept of callbacks is very similar to events. you make a callback when something happens, just like an event. This can be done even in old turbopascal programs or console mode programs.. I'm not so sure event driven programming is a must to become a competent programmer, I would have to think about that. Events could (may) force a programmer to think about programs in a certain way... when there are alternatives? or are events the only alternative just in another form (callbacks, or calling procedures). It begs the question about whether events are just procedures being called, which is the same as any programming methodology since all programs "call procedures". Is a compiler event driven? A competent programmer could write a compiler, or a parser. Are they necessary to have event driven architectures? i.e. is the fpc compiler event driven, even if not officially event driven someone ended up reinventing events in it? From what I understand Michael V. C.'s documentation tool is event driven which differs from the fpc compiler. However I beg the question: is all programming event driven in some way since events are just "calls to procedures". Of course that is simplifying it, but "what is an event?" would be a good computing science article to write. If I had any time.. From mailinglists at geldenhuys.co.uk Fri Oct 21 09:59:54 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Fri, 21 Oct 2016 08:59:54 +0100 Subject: [Lazarus] LCL Cocoa: Overriding delegate protocols In-Reply-To: <13f14f85-4056-210f-fbaa-f898daa176ff@scootersoftware.com> References: <13f14f85-4056-210f-fbaa-f898daa176ff@scootersoftware.com> Message-ID: On 2016-10-13 17:13, Zoë Peterson via Lazarus wrote: > It seems like the fix > would be to move all of the CreateHandle code into a method in > TCocoaWindow (possibly init) I'm not a core Lazarus developer, but your suggestion does sound like a good solution without down sides. One method doing multiple things is never a good design choice, so splitting it up definitely seems the right way to go. 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 mse00000 at gmail.com Fri Oct 21 10:11:48 2016 From: mse00000 at gmail.com (Martin Schreiber) Date: Fri, 21 Oct 2016 10:11:48 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <2abdc7c528d89aa16e535d0d6677e61a.squirrel@gator3286.hostgator.com> References: <2abdc7c528d89aa16e535d0d6677e61a.squirrel@gator3286.hostgator.com> Message-ID: <201610211011.48378.mse00000@gmail.com> On Friday 21 October 2016 09:51:38 Lars via Lazarus wrote: > > I'm not so sure event driven programming is a must to become a competent > programmer, I would have to think about that. "Event driven" probably means that there is an event queue with a central toolkit-main-eventloop which dispatches the events instead a program specific flow control. Martin From noreply at z505.com Fri Oct 21 10:08:26 2016 From: noreply at z505.com (Lars) Date: Fri, 21 Oct 2016 02:08:26 -0600 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <430d7a68-0e1c-8e81-a87f-c9ef4e7ff3bd@lumino.de> References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <34e032a0-2a68-09c2-19e0-ef390f78d3da@geldenhuys.co.uk> <430d7a68-0e1c-8e81-a87f-c9ef4e7ff3bd@lumino.de> Message-ID: On Mon, October 17, 2016 2:52 am, Michael Schnell via Lazarus wrote: > On 14.10.2016 16:10, Jürgen Hestermann via Lazarus wrote: > >> >> In most cases they never get to the step "find out how it works". >> If it works, nobody wants to invest time anymore to look under the hood. >> So they always operate on the surface and repeat the same >> subobtimal programming over and over again because they don't know how to >> do it better. >> > That is absolutely correct. > > > But the point where the "knowing how it works" is just a matter of > deliberate choice (or the professor, the student or the situation you get > in and need to crawl deeper into the complexity of the matter.- > > > - do I need know how/why the GUI builder creates the code that makes a > Button visible on a Form and my Event handler be called when a button > is pressed ? (I.e. do I need to be able to write the code myself without > the help of the GUI builder ?) > Sometimes knowing the internals and details can be a disadvantage because instead of thinking about the abstract program you are thinking about cpu cycles, bit popping, bit twiddling, low level API calls. Sometimes it's nice to live in La La land of an abstract layer over top so you can focus on the program construct, instead of low level implementation details. I for one, do not like doing pure Win Api calls, even though that can be so much fun for an intellectual exercise. The first time I really realized this was when I downloaded the Sysinternals tools (procmon, taskmon, regmon) now which no longer exist as sysinternals tools and were purchased by microsoft. I was absolutely fascinated that Mark R. and friend, wrote those tools in pure winapi... I was beautiful code. But I was also disappointed that they would waste their time on such low level code when a lot of it could have been easily abstracted with a tool like Delphi, with just some winapi calls directly, and most of the stuff automated with gui widgets already in a vcl. They didn't use c++ and did it in pure c, AFAIR. It was beautiful code, but then I asked my self.. why? why would you waste your time doing pure api calls? Just as intellectual exercize? Sometimes it's nice to live in a fairy land (abstract) over top of all the low level details. Also, Edsgar Dijkstra was also very much against knowing too many details about the CPU or computer hardware, as he though computing was math, not engineering of computers. From noreply at z505.com Fri Oct 21 10:12:53 2016 From: noreply at z505.com (Lars) Date: Fri, 21 Oct 2016 02:12:53 -0600 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <4ce22310-4fee-9b37-651f-1685ad90163b@geldenhuys.co.uk> References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <34e032a0-2a68-09c2-19e0-ef390f78d3da@geldenhuys.co.uk> <430d7a68-0e1c-8e81-a87f-c9ef4e7ff3bd@lumino.de> <4ce22310-4fee-9b37-651f-1685ad90163b@geldenhuys.co.uk> Message-ID: On Mon, October 17, 2016 3:07 am, Graeme Geldenhuys via Lazarus wrote: > On 2016-10-17 09:52, Michael Schnell via Lazarus wrote: > >> - do I need know how/why the GUI builder creates the code that makes a >> Button visible on a Form and my Event handler be called when a button >> is pressed ? > > Yes > > > (I.e. do I need to be able to write the code myself > >> without the help of the GUI builder ?) > > Yes > > > >> - do I need to know how the startup code works that make the Form >> visible on the screen ? > > Yes > > >> - do I need to know how the Event-Queue and the checksynchronize() >> system works ? > > If you are using queues and Synchronise, then Yes. > > > >> - do I need to know what system, calls the pascal program performs ? >> > > No > > > > The rest of your questions were just flame bait so don't deserve an > answer. > > > If you don't know any of the above, how do you expect to do any > debugging? Yes, debugging is a major part of being a programmer. I can chime in on this flame here. Although debugging is a major part of a lot of programmers life, it SHOULD NOT be. We should be developing applications knowing the entire source code of the application in our minds, without just knowing little tiny bits of the system and "Winging it". Today's bloatware applications are so large no one can understand them which is what attracts me to systems like Oberon by Nik. Wirth, and OpenBSD, and other small systems that are simple enough you can understand them in a month of reading about them (the basics). Also Plan9 from bell labs... and small programming languages, like oberon, are very interesting because they go against today's trends of bloatware like Firefox (as much as I love firefox) and Lisp, or Emacs. The idea that programmers spend much of their efforts debugging, is a bug, not a feature. Debugging itself, is a bug in a programmers life, that should be fixed. I love a small program that I rarely debug that's been running on a server for years without being touched. I dislike so much apps that need "maintenance". From noreply at z505.com Fri Oct 21 10:21:58 2016 From: noreply at z505.com (Lars) Date: Fri, 21 Oct 2016 02:21:58 -0600 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <34e032a0-2a68-09c2-19e0-ef390f78d3da@geldenhuys.co.uk> <430d7a68-0e1c-8e81-a87f-c9ef4e7ff3bd@lumino.de> <4ce22310-4fee-9b37-651f-1685ad90163b@geldenhuys.co.uk> Message-ID: <82d924b9841455745166ee418a80188c.squirrel@gator3286.hostgator.com> On Mon, October 17, 2016 3:48 am, Michael Schnell via Lazarus wrote: > On 17.10.2016 11:07, Graeme Geldenhuys via Lazarus wrote: > > >> YES ...YES...NO... >> > > IMHO a personal POV that is not very helpful in a totally general > discussion (please keep in mind that the intention of the OP to consider > Pascal instead of C was to keep the students from running away too soon. > oberon/golang instead of C are some other options. The issue with standard pascal in place of C was that once you figured out the limitations of the 255 length string and other standard pascal gotchyas, you not only ran away from C, you also ran away from Pascal. Apple tried to solve this by extending pascal, which defeated the purpose of a standard pascal. It was no longer standard. This all written about by Brian K in "what pascal is not my fav..." And the story is not so much different today, we have several instances of pascal floating about: delphi, fpc... and it gets worse: each release of delphi, breaks the last version so you end up polluting your code with IFDEF's and version checks, taking away from the actual program and causign the programmer to be concerned about completely irrelevant details that have nothing to do with high level abstract programming Oberon was supposed to solve this by making a standard version of pascal that was modern, but not calling it pascal since pascal had a bad reputation. But oberon, sadly, has several versions of itself... active oberon, object oberon, oberon 1 2 3 4 5... embedded oberon (oberon 7?) so this "shit" is not much different than C++, excuse my french! As much as I love all these programming languages we have to stop FORKING everything and replacing it with a new incompatible version next year. The time I waste converting old delphi 5 code to work in delphi berlin, or converting turbopascal units that are really useful over to modern delphi, is time wasted. I would rather have one language that remained the same for 20 years and then changed only after 20 years. This seems to be something that GOLang wants to do, stop making so many incompatible changes.. We'll see. Sometimes I just write code in Delphi 5 style and don't use any other features, to make it portable everywhere.. since any modern pascal compiler will compile delphi 5 code. The discipline of sticking to one standards compliant code is difficult. That's what Plain C is all about I guess, but then you end up wasting your life coding your own memory allocations. From juha.manninen62 at gmail.com Fri Oct 21 10:24:07 2016 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Fri, 21 Oct 2016 11:24:07 +0300 Subject: [Lazarus] How to use strings properly with fixes_1_6 and FPC 3.0.0? In-Reply-To: <435f528d-260c-ff77-aa0c-c4dded0ec5cd@yahoo.com> References: <435f528d-260c-ff77-aa0c-c4dded0ec5cd@yahoo.com> Message-ID: On Fri, Oct 21, 2016 at 10:03 AM, Gabor Boros via Lazarus wrote: > UTF8* is good to me but a compiler directive is easier to use, just don't > know why not working properly. Please the wiki page you found. It is explained there. http://wiki.freepascal.org/Better_Unicode_Support_in_Lazarus#String_Literals > What is the proper way to read through (character after character) the > string if use UTF8* procedures? A "character" in Unicode is an ambiguous term. Often the good old byte (codeunit) access is very useful. See: http://wiki.freepascal.org/UTF8_strings_and_characters Juha From juha.manninen62 at gmail.com Fri Oct 21 10:25:08 2016 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Fri, 21 Oct 2016 11:25:08 +0300 Subject: [Lazarus] How to use strings properly with fixes_1_6 and FPC 3.0.0? In-Reply-To: References: <435f528d-260c-ff77-aa0c-c4dded0ec5cd@yahoo.com> Message-ID: * Please read the wiki page ... From noreply at z505.com Fri Oct 21 10:29:26 2016 From: noreply at z505.com (Lars) Date: Fri, 21 Oct 2016 02:29:26 -0600 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <6be99731f84dd3cd4176185537002d09.squirrel@gator3286.hostgator.com> Message-ID: <0258c386bd052628258ef0422e0d48fe.squirrel@gator3286.hostgator.com> On Tue, October 18, 2016 4:42 am, Mehmet Erol Sanliturk via Lazarus wrote: > One unfortunate situation is that there is not much Pascal software for > Petri Nets processing , except the following ( which its license is very > ambiguous means not usable ) Hopefully in these situations, you can find a C dll and then just write a wrapper, in Pascal, to link the the DLL code. Any petri related DLL's that you could bind to? Just because the petri code is written in another language, doesn't mean you can then use fpc to link to it and write layers around it? I have no idea of dll's available for petri.. sorry, just offering this idea. In fact 99 percent of programming today is using other people's code that is stored away in dll's. The entire operating system is a bunch of dll's and likely your typical lazarus application only uses 1-10 percent pascal code and 90 percent DLL code in C. > > > Petri Nets are a vast subject now . There are some Petri Nets processing > software but their licenses being copy left are not friendly for > commercial environment . > Ahh, the age old license war which I've been a part of and why I prefer MIT/bsd code... > > Actually , it is not compulsory to use Pascal , but Pascal will supply > the Pascal programming language learners a very good example , Again you could also use a combination here: c dll's linked in. If that works. From noreply at z505.com Fri Oct 21 10:33:43 2016 From: noreply at z505.com (Lars) Date: Fri, 21 Oct 2016 02:33:43 -0600 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <6be99731f84dd3cd4176185537002d09.squirrel@gator3286.hostgator.com> <5b803e46-0bab-f5d2-e5c2-64f1ac4c90ea@lumino.de> Message-ID: <574e6fb689908d1e8299709f73c3f539.squirrel@gator3286.hostgator.com> On Tue, October 18, 2016 4:53 am, Mehmet Erol Sanliturk via Lazarus wrote: > My application was like the following ( as a very simple example ) : > > > Pose a problem "Display your name ." > After this is done : > > > "Display your name 10 times ." > > > The students were not able to write their programs . Then , solution was > "You should use a loop ." How do you know some clever student wouldn't end up using recursion without any loop involved? And that leads to a question, should recursion even be used in teaching or are loops easier to reason about? I find recursion, although intellectually interesting, kind of difficult to map in the mind, and I'm skeptical of all the functional languages using recursion, almost abusively. From mailinglists at geldenhuys.co.uk Fri Oct 21 10:58:47 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Fri, 21 Oct 2016 09:58:47 +0100 Subject: [Lazarus] Help System with Chromium Embedded component In-Reply-To: References: Message-ID: On 2016-10-21 08:04, Lars via Lazarus wrote: > powerful like a full fledged .CHM system or .hlp system. But even chm and > .hlp files are primitive, they are just basic, and 1990's technology. One thing you are overlooking is that most help authors don't use any of the advanced features of the existing help systems. For example: OS/2 INF/HLP help system has by default 2-way communication support. This is an excellent way to incorporate step-by-step tutorial help. In all my years of using OS/2, I've *never* seen anybody use that feature - except IBM. IBM did it very well, in where the help window tells the use what to do, a overlay appeared over the application window highlighting what the help is referring too. The user does what was instructed, and the help window automatically updates to the next step so so forth. Brilliantly useful, but nobody used it. > With chromium embedded it seems you can literally do anything you want: The down side being you need to have a 80-250MB application (full Firefox or Chrome or Chromium browsers and all dependencies) installed just to view some help contents. Also what happens if you don't use Firefox or Chrome? Also starting up those web browsers, even in an embedded environment is a slow process and they are huge and memory hungly! A decade ago I researched all of these things for a client of mine. We wanted offline help, must be searchable, help must load instantly (even a 1 second loading time is too slow), the help contents must be easy to author and no large supporting libraries/runtimes etc. My client also wanted context sensitive help down to the widget on a form level. It is atrocious that applications don't supply good offline help (if any help is even supplied) these days. It was surprisingly hard to find a solution, especially something cross-platform. In the end I researched help formats with the goal to implement our own help viewer. We looked at Microsoft's HLP, CHM formats, IBM's INF, OpenOffice's help, Gnome's help sytem and a few others. Long story short, in the end we decided on the IBM created INF help format, and I implemented a cross-platform help viewer that ticks all the requirements listed above and more. fpGUI's DocView help viewer was born. A 1MB help viewer that can load and parse not just one, but multiple INF files, and display the requested help topic in under a second. If multiple INF files were loaded their TOC get merged into a single TOC treeview. If they supply Index details, those too get get merged into a single Index view, or a Index can be auto-generated at runtime. It has advanced search features, hyperlink support, the usual rich text display features, bookmark support, user defined inline annotation support and DocView includes its own help file describing all its features (help on help). The INF help file format is impressively efficient in speed and size (help topic contents are indexed lookups to a global word dictionary - reducing size, allows for full-text searching etc). The INF help compiler I use is a cross-platform open source implementation from the OpenWatcom Compiler project. A single small executable with no external dependencies. FPC's fpdoc also supports generating IPF output which can then be compiled into binary INF help files. DocView can also be integrated with LCL or fpGUI application. If you log into the Lazarus Forum and view the following link, there is an attached source code of a LCL application, showing exactly how to integrate DocView with LCL applications to give you context sensitive help. http://forum.lazarus.freepascal.org/index.php/topic,27864.msg173887.html#msg173887 It can also be integrated into Lazarus IDE, Delphi IDE or any programmer editor that supports "external tools" functionality - without needing to compile and install IDE add-ons, yet still gives context sensitive help per keyword. http://fpgui.sourceforge.net/docview_ide_integration.shtml > they are static html files without any power added > to them, or they are chm files which are simple but not so powerful. What I also don't want from a help file is a Telly Tubbies like looking help text. By that I mean, some idiot with no flare for typography and design, being allowed to author and "customise" help content to death - making my eyes bleed just looking at it. And yes, I've seem many such CHM help files. That's why I like more minimalist help text (think OSX). It gets the point (help) across without making my eyes bleed, and no ugly distractions. DocView does allows for some end-user customisation though - changing the proportional and mono fonts used, font size, page background color and search highlighting color. The help content author doesn't need to stress about those "customisations" as it is not up to them to force their (possibly ugly) design onto the end user. The idea of help text is to help the end-user as efficiently as possible. It is not an excused for the help author to say "oh, look what I can do with colors, fonts and terrible design skills". As far as I'm concerned HTML is not a good choice for a help format. It's way to verbose and gives too much "design power" to the help author - without allowing end-user customisation. Adding JavaScript and such to the mix will make the problem even worse. Also, not all HTML viewer components are created equals. Just compare LHelp output so say kCHMViewer or Firefox. > to the mailing list as an idea for anyone who wants to make a rich help > system with a rich integrated help system. And I posted my personal opinions, which I know others might not agree with - but there you go. ;-) 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 Fri Oct 21 11:07:59 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Fri, 21 Oct 2016 10:07:59 +0100 Subject: [Lazarus] Chromium embedded on freebsd or firefox embedded In-Reply-To: References: Message-ID: On 2016-10-21 08:38, Lars via Lazarus wrote: > I so much love the bsd license and want to move my desktop and some of my > development over to BSD, but it just seems like bsd is constantly playing > catch up to what linux and windows already had years ago. I agree with the first part and disagree with the second part. :) I've switched to FreeBSD some 4 years ago, as my only desktop system for work and play. I've never been happier. My system runs for months on end without a reboot, I watch movies, browse the net, host multiple development VM's, run two 24/7 server VM's, and do all my daily development work on it. Upgrading is dead simple, and the ports system rocks! And the best part is ZFS - I'll never trust my data on anything else ever again. I also run a nVIDIA graphics card that drives 3 monitors. I've never been happier with my computer setup. I don't know about Chromium Embedded, but I did dab with Firefox Embedded 4 years ago, and from what I remember it was working fine. I never used in in a large-scale application though. I didn't like the large dependency I had to include with every application. 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 juergen.hestermann at gmx.de Fri Oct 21 11:09:15 2016 From: juergen.hestermann at gmx.de (=?UTF-8?Q?J=c3=bcrgen_Hestermann?=) Date: Fri, 21 Oct 2016 11:09:15 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <6be99731f84dd3cd4176185537002d09.squirrel@gator3286.hostgator.com> <5b803e46-0bab-f5d2-e5c2-64f1ac4c90ea@lumino.de> Message-ID: <793c05c4-536f-7bd6-7ac0-c474041fddfa@gmx.de> Am 2016-10-21 um 09:20 schrieb Lars via Lazarus: > The issue with console mode programs is students see utterly no use for them. Why should they not? A computer is a information processing machine and GUI is not necessary to process information, it's just a cosmetic thing. The interaction of a program with the user can be done in text mode too. Algorithms have nothing to do with GUI or text mode. If students just want to paint graphics and make a game of every program then they will never be real programmers. Not every program must be a game with visual effects. > GUI apps are of much more use to people as they are flashy and rich with > widgets, whereas console mode programs seem utterly boring. What is the use of a program? Entertainment? From noreply at z505.com Fri Oct 21 11:10:03 2016 From: noreply at z505.com (Lars) Date: Fri, 21 Oct 2016 03:10:03 -0600 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <34e032a0-2a68-09c2-19e0-ef390f78d3da@geldenhuys.co.uk> <4517fd9e-8ca2-2161-0954-e722e744de3a@geldenhuys.co.uk> Message-ID: <55b9f9eb57b6748b5c2f54d089aab7d1.squirrel@gator3286.hostgator.com> On Fri, October 14, 2016 6:11 am, wkitty42--- via Lazarus wrote: > On 10/14/2016 07:04 AM, Graeme Geldenhuys via Lazarus wrote: > >> On 2016-10-14 12:01, Graeme Geldenhuys via Lazarus wrote: >> >>> and maybe incite them every now and again >> >> Oops, that meant to read: "...and maybe entice them..." >> > > incite works, too :) > I recall Michael V. C. saying you could revoke a person's programming language... give them an "incitation" https://s-media-cache-ak0.pinimg.com/564x/20/41/bb/2041bb01aa8b11cb5c715cebd520d12a.jpg From nc-gaertnma at netcologne.de Fri Oct 21 11:13:31 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Fri, 21 Oct 2016 11:13:31 +0200 Subject: [Lazarus] Help System with Chromium Embedded component In-Reply-To: References: Message-ID: <20161021111331.0846d181@limapholos.matflo.wg> On Fri, 21 Oct 2016 09:58:47 +0100 Graeme Geldenhuys via Lazarus wrote: >[...] > http://forum.lazarus.freepascal.org/index.php/topic,27864.msg173887.html#msg173887 > > It can also be integrated into Lazarus IDE, Delphi IDE or any programmer > editor that supports "external tools" functionality - without needing to > compile and install IDE add-ons, yet still gives context sensitive help > per keyword. > > http://fpgui.sourceforge.net/docview_ide_integration.shtml Can the content of the wiki and FPC's guides be shown/searched with it too? Mattias From noreply at z505.com Fri Oct 21 11:18:07 2016 From: noreply at z505.com (Lars) Date: Fri, 21 Oct 2016 03:18:07 -0600 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: <0033ad35-491e-87fa-c287-b47070aca673@geldenhuys.co.uk> <20161013164803.7c976459@darkbreed> <1abaf000-7808-74fa-31f6-cb09d678d4c6@fastwebnet.it> Message-ID: <7620ddfe850b0dde620f944dfb4cc5fe.squirrel@gator3286.hostgator.com> > Both points are important, > being popular is also important, network effect is important. More users > means more libraries, more beta testers, more information, more tools. So, > better frameworks. Popular isn't always good. Look at perl's Cpan, or heck even java. Basically if you have a bunch of monkeys typing on typewriters it does not necessarily mean you are going to get a good book written by monkeys even if there are 1,000,000 working on it in the same room. Ruby Gems same thing. All this popular stuff doesn't necessarily mean high quality code. Take something utterly unpopular like Oberon, and you see super high quality code. Or OpenBSD that virtually no one uses yet it is rock solid code compared to some of the other garbage out there. Of course I don't want to reiterate what Paul Graham has said, he wrote an article about "popular" and it's issues. > > Don't underestimate the "popular factor". > Certainly. But popular is also analogous to monkeys on typewriters pumping out quantity, but not quality. Don't mean to call Ruby or Perl or Java programmers monkeys, but some of the stuff I've seen come out of that end appears to be of such. Cpan, for example, is a repository for all perl code. And very popular it was during the internet days when Perl was the duct tape of the internet. The fact that they called it "duct tape" should be the first clue... From juergen.hestermann at gmx.de Fri Oct 21 11:21:39 2016 From: juergen.hestermann at gmx.de (=?UTF-8?Q?J=c3=bcrgen_Hestermann?=) Date: Fri, 21 Oct 2016 11:21:39 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <34e032a0-2a68-09c2-19e0-ef390f78d3da@geldenhuys.co.uk> <430d7a68-0e1c-8e81-a87f-c9ef4e7ff3bd@lumino.de> Message-ID: <444d90d5-e932-7979-a301-d7a331c7b2dc@gmx.de> Am 2016-10-21 um 10:08 schrieb Lars via Lazarus: > Sometimes knowing the internals and details can be a disadvantage because > instead of thinking about the abstract program you are thinking about cpu > cycles, bit popping, bit twiddling, low level API calls. How do you think about "the abstract program" if you have no knowledge about the program language? How can you program without knowing what a variable or a while statement is? Programming is the mapping of an abstract problem into a programming language. But if you do not know how the programming language works, how can you then write programs? > Also, Edsgar Dijkstra was also very much against knowing too many details > about the CPU or computer hardware, as he though computing was math, not > engineering of computers. And how do you do math without knowledge about variables and loops? From noreply at z505.com Fri Oct 21 11:06:25 2016 From: noreply at z505.com (Lars) Date: Fri, 21 Oct 2016 03:06:25 -0600 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <20161014140145.1de4a272@darkbreed> References: <0033ad35-491e-87fa-c287-b47070aca673@geldenhuys.co.uk> <20161013164803.7c976459@darkbreed> <1abaf000-7808-74fa-31f6-cb09d678d4c6@fastwebnet.it> <20161014140145.1de4a272@darkbreed> Message-ID: >> Il 13/10/2016 16:48, Reimar Grabowski via Lazarus ha scritto: >> >> >>> If you want modern, teach them Java and let the programs run on their >>> phones or keep doing console programs and do the GUI in JS (aka web >>> applications). ^^ Wait, wasn't java killed, the day someone thought up the idea of compiling other languages to the JVM... LOL. What's the need for java if you can take any language of your choice, and compile it to JVM. The great thing about Java is that supposedly it's a small language.. but hell the libraries make it super complicated. From noreply at z505.com Fri Oct 21 11:28:50 2016 From: noreply at z505.com (Lars) Date: Fri, 21 Oct 2016 03:28:50 -0600 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <69bc7829-9b5c-debd-5794-581b701eba21@gmx.de> References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <6be99731f84dd3cd4176185537002d09.squirrel@gator3286.hostgator.com> <5b803e46-0bab-f5d2-e5c2-64f1ac4c90ea@lumino.de> <69bc7829-9b5c-debd-5794-581b701eba21@gmx.de> Message-ID: <375d04d810f74acbf14db1a45724a347.squirrel@gator3286.hostgator.com> On Tue, October 18, 2016 7:23 am, Jürgen Hestermann via Lazarus wrote: > Am 2016-10-18 um 12:53 schrieb Mehmet Erol Sanliturk via Lazarus: > >> Order of teaching is not so critical : As you say , write a GUI program >> for events : Say : "Now it is necessary to define what will be done for >> the events ? ... Its way is the following : Write your program parts in >> that way ..." > > IMO the order is extremly important! > If you start with the fundamental informations > (how does the processor work in general, > how are variables stored (stack/heap/etc.), what does the processor do in > loops, etc.) then this information is remembered very well because > everybody can imagine what goes on in general. You can *predict* what will > (should) happen in your program. > Hmmm.. I'm not so sure learning about the internals of the CPU is so good. IMO that is computer science, whereas programming is computing science. I was interested in how computers physically worked, before I became a programmer. One of the worst things a programmer can do is think in CPU cycles because it's a low level detail that has nothing to do with the program as a mathematical construct. For example in mathematics when you write equations on paper do you ever think about how the electronic calculator works, to process these numbers, when you punch the math into your calculator? The last thing a mathematics student knows about, is the internal architechture of the Casio calculator he is using, because he's more focused on the maths... which IMO is good. To now know anything, and be completely ignorant, of the casio calculator and how it processes your equations and additions and subtractions, is a very good thing. On the other hand, someone interested in physics, and computer science (not computing science) will benefit greatly from learning how the cpu works, memory, etc. Every time they said they were offering "computer science" courses, as a child I always wondered... is that how the capacitors, resistors, and cpu chips work? I never once could possibly grasp how programming a computer had anything to do with the computer itself. As programming can be done on paper and never touch a computer, and still be a a program that is understandable even if it doesn't run on any physical system. I've been very skeptical of any programmer who immediately converts his program to assembly instructions. I can see how it is useful for debugging, and creating a compiler on hardware, but it completely ruins the abstract program concept. It's equivalent of someone writing a beautiful mathematics paper, and then converting it to his casio calculator instruction set. A mathematician would never do such a thing as he couldn't care less about the internals of his casio calculator. So I don't understand why so many programmers are obsessed with low level details. I guess I just find abstract la la land a better place to be in, where there is even a potential for a program to be proven correct and never debugged. > > If you just start with clicking you do not know *why* it works > (if it works) nor do you know *why* it does not work (if it does not do > so). They would always need someone at hand with exprience to tell them > how to continue. This can be very frustrating for studends. > > Therefore I would always present at least a rough overview about > procedural programming before starting with objects and events. In the > end, the latter is still processed in a procedural manner which every > programmer should know. > > >> My application was like the following ( as a very simple example ) : >> Pose a problem "Display your name ." >> After this is done : >> "Display your name 10 times ." >> The students were not able to write their programs . Then , solution was >> "You should use a loop ." >> "A loop is defined in the following ways : ... " >> Such an approach is used frequently in Mathematics text books : >> Subject text . >> Problems .. >> Last problems were "Unsolvable" with the above text . >> Solution : >> "Read the next chapter ..." >> Such approaches are "the Art of Teaching" ... >> > > IMO this "approach" has a severe drawback: > The students do not get an overall picture of what > *can* be done and *how* it can be done. > If they do not know about loops how should they > know that they exist? They would need to read *everything* that is > available and hope to find something helpful. That is very frustrating and > can lead to suboptimal solutions because they get tired of reading yet > another chapter and instead use something else (like copying the code in > the editor 10 times). > > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus > > From gaborboros at yahoo.com Fri Oct 21 11:29:36 2016 From: gaborboros at yahoo.com (Gabor Boros) Date: Fri, 21 Oct 2016 11:29:36 +0200 Subject: [Lazarus] How to use strings properly with fixes_1_6 and FPC 3.0.0? In-Reply-To: References: <435f528d-260c-ff77-aa0c-c4dded0ec5cd@yahoo.com> Message-ID: 2016. 10. 21. 10:24 keltezéssel, Juha Manninen via Lazarus írta: > A "character" in Unicode is an ambiguous term. > Often the good old byte (codeunit) access is very useful. > See: > http://wiki.freepascal.org/UTF8_strings_and_characters I started with the wiki pages, but 2 about UTF8 in english is too much for me and you pointed to a 3rd... :-) On the above link at "Searching a substring" I read "Due to the special nature of UTF8 you can simply use the normal string functions for searching a sub-string.". But the example Where procedure returns this for me: "The substring "á" is in the text "éáó" at byte position 3 and at character position 1". Which incorrect because á is the 2nd character. Gabor From mailinglists at geldenhuys.co.uk Fri Oct 21 11:34:51 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Fri, 21 Oct 2016 10:34:51 +0100 Subject: [Lazarus] Help System with Chromium Embedded component In-Reply-To: <20161021111331.0846d181@limapholos.matflo.wg> References: <20161021111331.0846d181@limapholos.matflo.wg> Message-ID: <0690e875-8608-c93d-ce39-f86e7a0bf5e3@geldenhuys.co.uk> On 2016-10-21 10:13, Mattias Gaertner via Lazarus wrote: > Can the content of the wiki and FPC's guides be shown/searched with it > too? Wiki no, FPC guides yes. I believe somebody was working on a "wiki exporter" tool at some point, so the Wiki content could be made available offline. I assume it would result in offline HTML files. That could then be converted (with another tool) to INF in there was a need. ps: Don't knock my obsession with offline help. :) Just 3 weeks ago, I was stuck with no Internet for 7 days. Thank goodness for all my offline INF help files. ;-) Regards, Graeme From noreply at z505.com Fri Oct 21 11:35:03 2016 From: noreply at z505.com (Lars) Date: Fri, 21 Oct 2016 03:35:03 -0600 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <8430a9a8-115c-3eaa-296a-74708b42ee93@gmx.de> References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <6be99731f84dd3cd4176185537002d09.squirrel@gator3286.hostgator.com> <5b803e46-0bab-f5d2-e5c2-64f1ac4c90ea@lumino.de> <69bc7829-9b5c-debd-5794-581b701eba21@gmx.de> <0d466493-3a52-0b38-503e-ee5372e48f73@lumino.de> <8430a9a8-115c-3eaa-296a-74708b42ee93@gmx.de> Message-ID: <31e334aade2540174a1b132d01faafcd.squirrel@gator3286.hostgator.com> On Tue, October 18, 2016 9:16 am, Jürgen Hestermann via Lazarus wrote: > Am 2016-10-18 um 16:47 schrieb Michael Schnell via Lazarus: > >> If you start with complex stuff that does not yield immediate success >> (i.e. a working program that does something that might be useful) The >> students will loose interest and run away, unless they are nerds like >> ourselves. > > Yes, therefore start with simple procedural (console) > programs that let them have immediate success with all the elementary > things that a program consists of (variables/types, loops, commands, > etc.). If that is understood you can switch to GUI applications. > > > If you do it the other way round you only delay the date > of frustration but you do not avoid it. > There are two sides to this story, I'm afraid. I'm a fan of the console program teaching method myself but the issue is: console mode programs are irrelevant and useless. Today, MS DOS doesn't exist any more. Even when ms dos existed, console mode programs were boring, and only complete geeks would be interested in creating console mode programs. We're talking about people who have no social lives who create text mode games here... If I was introduced to ComponentPascal (oberon) or delphi as a person learning programming, where there were actual widgets you could create, it just might convince me that programming is of some use. Console mode programs are utterly useless to a newcomer. Wow you created a console mode program that prints and asks questions... Joy Joy! I think that's why I never got interested in Basic, for ms dos... It was on my machine but I just couldn't see how it was of any use. Now on the other hand if Delphi was on a windows 3.1 machine I may have even been interested, as you could just see a person being drawn into wiz bang widgetsets.. that do something useful, unlike a boring console mode program. Saying that, I still am a fan of console mode program teaching as it teaches you about variables, setting values, incrementing, etc. Today, programmers learn to program in PHP because HTML is the widgetset. Often a first programming language a person learns is PHP these days, IMO. And that's sad, as it creates bad habits galore. All because HTML today is literally "the widget set" being used for programming. From juergen.hestermann at gmx.de Fri Oct 21 11:38:23 2016 From: juergen.hestermann at gmx.de (=?UTF-8?Q?J=c3=bcrgen_Hestermann?=) Date: Fri, 21 Oct 2016 11:38:23 +0200 Subject: [Lazarus] *** GMX Spamverdacht *** Re: Teaching Pascal at College In-Reply-To: <574e6fb689908d1e8299709f73c3f539.squirrel@gator3286.hostgator.com> References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <6be99731f84dd3cd4176185537002d09.squirrel@gator3286.hostgator.com> <5b803e46-0bab-f5d2-e5c2-64f1ac4c90ea@lumino.de> <574e6fb689908d1e8299709f73c3f539.squirrel@gator3286.hostgator.com> Message-ID: <01d8816c-a37d-1772-6595-76f7e07600de@gmx.de> Am 2016-10-21 um 10:33 schrieb Lars via Lazarus: > How do you know some clever student wouldn't end up using recursion > without any loop involved? How can a student think about loops and recursion at all if he does not get the information that they exist (in the specific programming language)? So the "clever" student that does something that has not been taught in a course may not need the course at all. But what about those who want to learn in a course? If you do not give essential information about a programming language then you do not need the course at all. > And that leads to a question, should recursion even be used in teaching or > are loops easier to reason about? > I find recursion, although intellectually interesting, kind of difficult > to map in the mind, and I'm skeptical of all the functional languages > using recursion, almost abusively. I prefer loops instead of recusion too, mostly because they are easier to understand and debug. Nevertheless, in some special situations I also use recursion, especially, when interim results need to be stored which is easier on the stack. Handling additional data (on the heap) is cumbersome too. And when teaching a programming language that allows recursion then of course it should be taught. From nc-gaertnma at netcologne.de Fri Oct 21 11:40:26 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Fri, 21 Oct 2016 11:40:26 +0200 Subject: [Lazarus] How to use strings properly with fixes_1_6 and FPC 3.0.0? In-Reply-To: References: <435f528d-260c-ff77-aa0c-c4dded0ec5cd@yahoo.com> Message-ID: <20161021114026.1e4ddc45@limapholos.matflo.wg> On Fri, 21 Oct 2016 11:29:36 +0200 Gabor Boros via Lazarus wrote: > 2016. 10. 21. 10:24 keltezéssel, Juha Manninen via Lazarus írta: > > A "character" in Unicode is an ambiguous term. > > Often the good old byte (codeunit) access is very useful. > > See: > > http://wiki.freepascal.org/UTF8_strings_and_characters > > I started with the wiki pages, but 2 about UTF8 in english is too much > for me and you pointed to a 3rd... :-) > > On the above link at "Searching a substring" I read "Due to the special > nature of UTF8 you can simply use the normal string functions for > searching a sub-string.". But the example Where procedure returns this > for me: "The substring "á" is in the text "éáó" at byte position 3 and > at character position 1". Which incorrect because á is the 2nd character. Thanks for the hint. I fixed it. Mattias From noreply at z505.com Fri Oct 21 11:41:49 2016 From: noreply at z505.com (Lars) Date: Fri, 21 Oct 2016 03:41:49 -0600 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> Message-ID: <2067f87ce85cc7c30577413e5f958bba.squirrel@gator3286.hostgator.com> On Fri, October 14, 2016 4:42 am, Mehmet Erol Sanliturk via Lazarus wrote: > On Fri, Oct 14, 2016 at 1:18 AM, Michael Schnell via Lazarus < > lazarus at lists.lazarus-ide.org> wrote: > >> On 13.10.2016 10:20, Graeme Geldenhuys via Lazarus wrote: >> >> >>> +1 >>> That would be the best solution. GUI programming is based on >>> fundamentals than need to be understood first. >>> >> >> -1 !! >> >> >> The OP explained that his main purpose is to introduce more fun in the >> education. That can be done by plunging into programming directly with >> GUI >> development. >> >> This is why RAD had been invented. >> >> >> Of course there are decent drawbacks regarding relying too much on RAD >> and about not really understanding the fundamentals behind it. >> >> But in the end the addressees are non-computer engineers. >> >> >> -Michael >> -- >> _______________________________________________ >> >> > > > As an engineer , they need to write programs for doing computations not > available in ready-made packages . Therefore , they need to a sufficient > knowledge to write programs . This can be achieved in a good balance of > learning programming itself and GUI application . > > The word engineer is so overloaded, that I hate it, with my guts. What is an engineer? A guy "who makes stuff".. which pretty much describes every single profession. Do software engineers have to buy an APPEGA subscription? are they registered as professional engineers and have to have a degree to prove it? I think the word engineer should be kept for the oil and gas industry, IMO, where buffoons engineer solutions to rape oil out of the ground. I prefer the term programmer... I made the mistake of thinking of myself as a software engineer at one time, but I'm wondering... since engineering requires a membership with an organization like APEGA, are software engineers misusing the engineer term? Now, if you mean "engineer" as in someone who really does hold an APEGA subscription and is using programming languages to control oil and gas industry PLC's (logic controllers) then I can understand using engineer as a title. Honestly, I just hate the word engineer... as to me an engineer is a vague, meaningless term. It essentially means "guy who makes solutions to problems" or "Guy who makes things"... But since engineers have to have an APEGA subscription to be a valid engineer, why are programmers using the term? It's leaked into the industry and profession, which was a big mistake imo. I just prefer the term programmer. Not hacker. Not engineer. I'm a programmer. From noreply at z505.com Fri Oct 21 11:51:23 2016 From: noreply at z505.com (Lars) Date: Fri, 21 Oct 2016 03:51:23 -0600 Subject: [Lazarus] How to use strings properly with fixes_1_6 and FPC 3.0.0? In-Reply-To: <435f528d-260c-ff77-aa0c-c4dded0ec5cd@yahoo.com> References: <435f528d-260c-ff77-aa0c-c4dded0ec5cd@yahoo.com> Message-ID: On Fri, October 21, 2016 1:03 am, Gabor Boros via Lazarus wrote: > Hi All, > > > In the past I used Length, Pos, Delete, for i:=1 to Length(s) do s[i]... > and realized yesterday these practices are wrong. But I do not know what > the right practice. Indeed this is a serious problem these days, unicode.. which is almost a virus. In GoLang they use something called "Runes" to try and solve the problem. Off topic but I wonder if Lazarus/fpc uses something anything similar to golang's rune's approach or looked into it. IMO unicode reaches something like Godel's incompleteness problem. You can never actually prove that a unicode program will work properly nor prove that it won't have bugs, because unicode creates infinite gotchyas and unicode is always evolving to have more characters that you didn't know about before. It makes code inelegant compared to plain english 255 systems like in the 1970's. There is an interesting article/video about it on Sucksless, and even this guy scares me when he talks about unicode even though he is trying to fix the problems: "UTF-8 everywhere? Writing Unicode compliant software that sucks less, Laslo Hunhold" But it of course is not specific to Lazarus. Sorry for slightly off topic. From juergen.hestermann at gmx.de Fri Oct 21 12:04:26 2016 From: juergen.hestermann at gmx.de (=?UTF-8?Q?J=c3=bcrgen_Hestermann?=) Date: Fri, 21 Oct 2016 12:04:26 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <375d04d810f74acbf14db1a45724a347.squirrel@gator3286.hostgator.com> References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <6be99731f84dd3cd4176185537002d09.squirrel@gator3286.hostgator.com> <5b803e46-0bab-f5d2-e5c2-64f1ac4c90ea@lumino.de> <69bc7829-9b5c-debd-5794-581b701eba21@gmx.de> <375d04d810f74acbf14db1a45724a347.squirrel@gator3286.hostgator.com> Message-ID: Am 2016-10-21 um 11:28 schrieb Lars via Lazarus: > Hmmm.. I'm not so sure learning about the internals of the CPU is so good. > IMO that is computer science, whereas programming is computing science. > I was interested in how computers physically worked, before I became a > programmer. One of the worst things a programmer can do is think in CPU > cycles because it's a low level detail that has nothing to do with the > program as a mathematical construct. I am talking about the general construction of a computer: That a CPU exists with registers to store data which runs your program and that it has some rudimentary built in commands (a rough overview of them is useful) and that a stack and a heap exits to store data. That's almost enough. I am not talking about knowing how many CPU cycles a certain command takes. But a programmer should know to what his program boils down to in the end. Otherwise he would not know what limits exist and how to avoid exceeding them. > For example in mathematics when you write equations on paper do you ever > think about how the electronic calculator works, to process these numbers, > when you punch the math into your calculator? The last thing a mathematics > student knows about, is the internal architechture of the Casio calculator > he is using, because he's more focused on the maths... which IMO is good. That is a bad comparison. In a calculator you have no choice how to "program" equations. You just type them and get a result. But even here you need to know how the calculator works as you may have polish notation or the calculator may obey point before line calculation or not. If you do not know these details you cannot use the calculator effiently. From nc-gaertnma at netcologne.de Fri Oct 21 12:05:07 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Fri, 21 Oct 2016 12:05:07 +0200 Subject: [Lazarus] Help System with Chromium Embedded component In-Reply-To: <0690e875-8608-c93d-ce39-f86e7a0bf5e3@geldenhuys.co.uk> References: <20161021111331.0846d181@limapholos.matflo.wg> <0690e875-8608-c93d-ce39-f86e7a0bf5e3@geldenhuys.co.uk> Message-ID: <20161021120507.33bf5fdd@limapholos.matflo.wg> On Fri, 21 Oct 2016 10:34:51 +0100 Graeme Geldenhuys via Lazarus wrote: > On 2016-10-21 10:13, Mattias Gaertner via Lazarus wrote: > > Can the content of the wiki and FPC's guides be shown/searched with it > > too? > > Wiki no, FPC guides yes. I would like to test that. Can you give me a link or hint? > I believe somebody was working on a "wiki exporter" tool at some point, > so the Wiki content could be made available offline. There is one in lazarus/components/wiki. wikiget downloads the wiki sources. And there is wikiconvert which outputs html, chm or xhtml. Some elements are not yet converted correctly. > I assume it would > result in offline HTML files. That could then be converted (with another > tool) to INF in there was a need. ... or add a direct converter from wiki to inf. Mattias From gaborboros at yahoo.com Fri Oct 21 12:05:18 2016 From: gaborboros at yahoo.com (Gabor Boros) Date: Fri, 21 Oct 2016 12:05:18 +0200 Subject: [Lazarus] How to use strings properly with fixes_1_6 and FPC 3.0.0? In-Reply-To: References: <435f528d-260c-ff77-aa0c-c4dded0ec5cd@yahoo.com> Message-ID: <6a33e896-a1d6-4908-0dee-49cf23e764b8@yahoo.com> 2016. 10. 21. 10:25 keltezéssel, Juha Manninen via Lazarus írta: > * Please read the wiki page ... I read, I read but if contains buggy example... ;-) I need a quick and a rock solid solution. Is it good solution if replace all Length, Copy, Delete with UTF8Length, UTF8Copy, UTF8Delete and read the strings through with this for i:=1 to UTF8Length(s) do Write(UTF8Copy(s,i,1))? I do not want to think of where Length, Copy, Delete is good and where UTF8* needed. Gabor From nc-gaertnma at netcologne.de Fri Oct 21 12:09:46 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Fri, 21 Oct 2016 12:09:46 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <2067f87ce85cc7c30577413e5f958bba.squirrel@gator3286.hostgator.com> References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <2067f87ce85cc7c30577413e5f958bba.squirrel@gator3286.hostgator.com> Message-ID: <20161021120946.0cbf22a5@limapholos.matflo.wg> On Fri, 21 Oct 2016 03:41:49 -0600 Lars via Lazarus wrote: >[...] > The word engineer is so overloaded, that I hate it, with my guts. > > What is an engineer? A guy "who makes stuff".. which pretty much describes > every single profession. This is going off-topic. Please stick to the topic. Mattias From luca at wetron.es Fri Oct 21 12:17:29 2016 From: luca at wetron.es (Luca Olivetti) Date: Fri, 21 Oct 2016 12:17:29 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <793c05c4-536f-7bd6-7ac0-c474041fddfa@gmx.de> References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <6be99731f84dd3cd4176185537002d09.squirrel@gator3286.hostgator.com> <5b803e46-0bab-f5d2-e5c2-64f1ac4c90ea@lumino.de> <793c05c4-536f-7bd6-7ac0-c474041fddfa@gmx.de> Message-ID: El 21/10/16 a les 11:09, Jürgen Hestermann via Lazarus ha escrit: > Am 2016-10-21 um 09:20 schrieb Lars via Lazarus: >> The issue with console mode programs is students see utterly no use > for them. > > Why should they not? > A computer is a information processing machine and GUI is not necessary to > process information, it's just a cosmetic thing. > The interaction of a program with the user can be done in text mode too. > Algorithms have nothing to do with GUI or text mode. e.g. http://stats.ioinformatics.org/tasks/2016/ Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From juergen.hestermann at gmx.de Fri Oct 21 12:35:31 2016 From: juergen.hestermann at gmx.de (=?UTF-8?Q?J=c3=bcrgen_Hestermann?=) Date: Fri, 21 Oct 2016 12:35:31 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <31e334aade2540174a1b132d01faafcd.squirrel@gator3286.hostgator.com> References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <6be99731f84dd3cd4176185537002d09.squirrel@gator3286.hostgator.com> <5b803e46-0bab-f5d2-e5c2-64f1ac4c90ea@lumino.de> <69bc7829-9b5c-debd-5794-581b701eba21@gmx.de> <0d466493-3a52-0b38-503e-ee5372e48f73@lumino.de> <8430a9a8-115c-3eaa-296a-74708b42ee93@gmx.de> <31e334aade2540174a1b132d01faafcd.squirrel@gator3286.hostgator.com> Message-ID: <4d44bf75-f4af-1278-7653-ea3c8c6c49dc@gmx.de> Am 2016-10-21 um 11:35 schrieb Lars via Lazarus: > There are two sides to this story, I'm afraid. I'm a fan of the console > program teaching method myself but the issue is: console mode programs are > irrelevant and useless. > Today, MS DOS doesn't exist any more. Even when > ms dos existed, console mode programs were boring, and only complete geeks > would be interested in creating console mode programs. We're talking about > people who have no social lives who create text mode games here... Well, how can you do GUI programming without knowing about variables and loops? Console mode programs are just a vehicle to introduce these fundamentals. Nobody can expect to be able to program a block buster game after a one hour programming course. If students are already bored by not having fun after 10 minutes course they will not become successful programmers anyway. And there are useful console mode programs where you can learn the fundamentals: I once got a (physical) card game with 9 cards. Each showed parts of a person with differently colored arms, legs, heads on top, bottom, left, right. You had to arrange these cards in 3 rows and 3 columns so that the whole picture shows all persons with the same colored bodies on adjacent sides. This drove me nuts as I did not find out how to arrange them even after days. So I programmed it (in a console program), eh voila, all possible solutions were found after 1 or 2 hours of programming. I think this is a good exercise to learn about the details of a programming language. And I had fun when doing this (even though it was a console mode program). From juha.manninen62 at gmail.com Fri Oct 21 12:38:25 2016 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Fri, 21 Oct 2016 13:38:25 +0300 Subject: [Lazarus] How to use strings properly with fixes_1_6 and FPC 3.0.0? In-Reply-To: <6a33e896-a1d6-4908-0dee-49cf23e764b8@yahoo.com> References: <435f528d-260c-ff77-aa0c-c4dded0ec5cd@yahoo.com> <6a33e896-a1d6-4908-0dee-49cf23e764b8@yahoo.com> Message-ID: On Fri, Oct 21, 2016 at 1:05 PM, Gabor Boros via Lazarus wrote: > 2016. 10. 21. 10:25 keltezéssel, Juha Manninen via Lazarus írta: > I read, I read but if contains buggy example... ;-) Mattias fixed the bug. > I need a quick and a rock solid solution. Is it good solution if replace all > Length, Copy, Delete with UTF8Length, UTF8Copy, UTF8Delete and read the > strings through with this for i:=1 to UTF8Length(s) do > Write(UTF8Copy(s,i,1))? No, it not a good solution! I predict that most your code can still use byte indexing. At some point you will get a Heureka-moment like "hey, I don't need the codepoint index when doing this task!". > I do not want to think of where Length, Copy, Delete is good and where UTF8* > needed. Well, you must think when coding. There is no shortcut. :) BTW, if you are worried about Delphi compatibility there is now unit LazUnicode available. See: http://wiki.freepascal.org/Better_Unicode_Support_in_Lazarus#CodePoint_functions_for_encoding_agnostic_code Juha From juergen.hestermann at gmx.de Fri Oct 21 12:48:23 2016 From: juergen.hestermann at gmx.de (=?UTF-8?Q?J=c3=bcrgen_Hestermann?=) Date: Fri, 21 Oct 2016 12:48:23 +0200 Subject: [Lazarus] How to use strings properly with fixes_1_6 and FPC 3.0.0? In-Reply-To: <6a33e896-a1d6-4908-0dee-49cf23e764b8@yahoo.com> References: <435f528d-260c-ff77-aa0c-c4dded0ec5cd@yahoo.com> <6a33e896-a1d6-4908-0dee-49cf23e764b8@yahoo.com> Message-ID: <29be6dee-a18d-d30e-6b99-ec37b20b3679@gmx.de> Am 2016-10-21 um 12:05 schrieb Gabor Boros via Lazarus: > 2016. 10. 21. 10:25 keltezéssel, Juha Manninen via Lazarus írta: >> * Please read the wiki page ... > I read, I read but if contains buggy example... ;-) Yes, this can be very frustrating... Documenation is one of the major drawbacks of Free Pascal/Lazarus. > I need a quick and a rock solid solution. Is it good solution if replace all Length, Copy, Delete with UTF8Length, UTF8Copy, UTF8Delete and read the strings through with this for i:=1 to UTF8Length(s) do Write(UTF8Copy(s,i,1))? > I do not want to think of where Length, Copy, Delete is good and where UTF8* needed. I think if you want to use unicode (which is IMO unavoidable today) then UTF8 is a good choice (see http://utf8everywhere.org ) and then you have to cope with the encoding anyway. Byte and character position are not related anymore, neither in UTF-8 nor in UTF-16. Only UTF-32 provides this but wastes a lot of memory. But in many cases you do not need the character position. To find a substring, you only need the byte position. You can then delete this character from the byte position and insert another one. Of course, you need to delete as many bytes as the character consists of. If you realy need the character position/length, then you have to use UTF8Length/UTF8Copy/etc. But as said: It is only needed in special circumstances. Still you have to know when to use what. From mailinglists at geldenhuys.co.uk Fri Oct 21 13:13:32 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Fri, 21 Oct 2016 12:13:32 +0100 Subject: [Lazarus] Help System with Chromium Embedded component In-Reply-To: <20161021120507.33bf5fdd@limapholos.matflo.wg> References: <20161021111331.0846d181@limapholos.matflo.wg> <0690e875-8608-c93d-ce39-f86e7a0bf5e3@geldenhuys.co.uk> <20161021120507.33bf5fdd@limapholos.matflo.wg> Message-ID: On 2016-10-21 11:05, Mattias Gaertner via Lazarus wrote: >> Wiki no, FPC guides yes. > > I would like to test that. Can you give me a link or hint? Regarding the FPC guides. I consider the FPC Language Reference the most important one, so I manually converted it (and keep it in sync with FPC releases when I can), and also added my own additions to take advantage of the INF format. See attached screenshot. As for the others guides, I wrote a tool that does LaTex to IPF conversions (that was hard). I also did a HTML to IPF tool. But in both cases some elements are not yet converted, and generally the formatting is not nearly as good as it should be (my standards are high when it comes to help formatting). So I don't publicise what I don't think is of high enough quality yet. Take the Free Pascal CHM help as an example - it is horrific looking. The fpdoc's HTML output writer was clearly designed for online HTML usage with popup browser windows and decent CSS support etc. The CHM conversion of that gives broken links, unsupported features and bad formatting. It just gives the documentation a bad wrap. fpdoc should have a dedicated CHM output writer. The same can be said for an ePub HTML output writer (if that ever materializes). > There is one in lazarus/components/wiki. wikiget downloads the wiki > sources. And there is wikiconvert which outputs html, chm or xhtml. Ah, thanks. I'll take a look at that when I have a moment. > ... or add a direct converter from wiki to inf. Yes, that would be the best solution. 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 -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot.png Type: image/png Size: 40022 bytes Desc: not available URL: From gaborboros at yahoo.com Fri Oct 21 13:13:47 2016 From: gaborboros at yahoo.com (Gabor Boros) Date: Fri, 21 Oct 2016 13:13:47 +0200 Subject: [Lazarus] How to use strings properly with fixes_1_6 and FPC 3.0.0? In-Reply-To: References: <435f528d-260c-ff77-aa0c-c4dded0ec5cd@yahoo.com> <6a33e896-a1d6-4908-0dee-49cf23e764b8@yahoo.com> Message-ID: 2016. 10. 21. 12:38 keltezéssel, Juha Manninen via Lazarus írta: >> I do not want to think of where Length, Copy, Delete is good and where UTF8* >> needed. > > Well, you must think when coding. There is no shortcut. :) > > BTW, if you are worried about Delphi compatibility there is now unit > LazUnicode available. Delphi compatibility not needed for me, but I am a silly coder and don't understand why the wiki say you can use Length, Copy, Delete with UTF8. See two examples below. First is a Lazarus project with a simple editbox, if press á (Alt+160) the form caption show 2. The second example is a console project (in Lazarus also), if press á (Alt+160) then Enter see 1 as result. Same FCP same Lazarus. Why is there a difference in the result? 1. procedure TForm1.Edit1Change(Sender: TObject); begin Caption:=IntToStr(Length(Edit1.Text)); end; 2. var s:string; begin ReadLn(s); Write(Length(s)); ReadLn; end. Gabor From noreply at z505.com Fri Oct 21 13:23:01 2016 From: noreply at z505.com (Lars) Date: Fri, 21 Oct 2016 05:23:01 -0600 Subject: [Lazarus] Chromium embedded on freebsd or firefox embedded In-Reply-To: References: Message-ID: On Fri, October 21, 2016 3:07 am, Graeme Geldenhuys via Lazarus wrote: > > I don't know about Chromium Embedded, but I did dab with Firefox > Embedded 4 years ago, and from what I remember it was working fine. I > never used in in a large-scale application though. I didn't like the large > dependency I had to include with every application. > Ahh, the dependency issue is definitely an issue since the dll's and files included are massive. Okay for large apps, but for small apps it increases the download size significantly. When you dabbed with firefox embedded, was it a lazarus component? Or did you make calls directly to an API without using a component? Appreciate Michael V. C.'s article on the topic, in a PDF. Some of the old links are dead though, referencing the newbielabs website. From gaborboros at yahoo.com Fri Oct 21 13:23:11 2016 From: gaborboros at yahoo.com (Gabor Boros) Date: Fri, 21 Oct 2016 13:23:11 +0200 Subject: [Lazarus] How to use strings properly with fixes_1_6 and FPC 3.0.0? In-Reply-To: <29be6dee-a18d-d30e-6b99-ec37b20b3679@gmx.de> References: <435f528d-260c-ff77-aa0c-c4dded0ec5cd@yahoo.com> <6a33e896-a1d6-4908-0dee-49cf23e764b8@yahoo.com> <29be6dee-a18d-d30e-6b99-ec37b20b3679@gmx.de> Message-ID: <2717282d-30a5-7633-f1fe-a9eee369f32e@yahoo.com> 2016. 10. 21. 12:48 keltezéssel, Jürgen Hestermann via Lazarus írta: > If you realy need the character position/length, then > you have to use UTF8Length/UTF8Copy/etc. > But as said: It is only needed in special circumstances. > Still you have to know when to use what. I will know if somebody describe what a difference between á and an á characters in two points of my program. I answered to Juha's reply with two short examples. Don't understand why an á character/string different for example from a ReadLn and from Edit1.Text. Gabor From noreply at z505.com Fri Oct 21 13:26:13 2016 From: noreply at z505.com (Lars) Date: Fri, 21 Oct 2016 05:26:13 -0600 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <201610211011.48378.mse00000@gmail.com> References: <2abdc7c528d89aa16e535d0d6677e61a.squirrel@gator3286.hostgator.com> <201610211011.48378.mse00000@gmail.com> Message-ID: <5f4b6f4732235f2c578502f3e0781938.squirrel@gator3286.hostgator.com> On Fri, October 21, 2016 2:11 am, Martin Schreiber via Lazarus wrote: > On Friday 21 October 2016 09:51:38 Lars via Lazarus wrote: > >> >> I'm not so sure event driven programming is a must to become a >> competent programmer, I would have to think about that. > > "Event driven" probably means that there is an event queue with a central > toolkit-main-eventloop which dispatches the events instead a program > specific flow control. > What about a pure win32 API app written in C. Do you essentially reinvent your own event system using callbacks with program flow control? Or the win32 api has an event system in its api itself? Been a while since I did some win32 api programming.. I'm just wondering if pretty much every system out there has some kind of rolled your own event system of some kind. The other common item that pops up everywhere is some kind of messaging system to notify objects, which I guess is what Smalltalk takes credit for. From juha.manninen62 at gmail.com Fri Oct 21 13:26:54 2016 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Fri, 21 Oct 2016 14:26:54 +0300 Subject: [Lazarus] How to use strings properly with fixes_1_6 and FPC 3.0.0? In-Reply-To: References: <435f528d-260c-ff77-aa0c-c4dded0ec5cd@yahoo.com> Message-ID: On Fri, Oct 21, 2016 at 12:51 PM, Lars via Lazarus wrote: > Indeed this is a serious problem these days, unicode.. which is almost a virus. > In GoLang they use something called "Runes" to try and solve the problem. I had to search about what "runes" in GoLang mean. I found: --- "Code point" is a bit of a mouthful, so Go introduces a shorter term for the concept: rune. The term appears in the libraries and source code, and means exactly the same as "code point", with one interesting addition. The Go language defines the word rune as an alias for the type int32, so programs can be clear when an integer value represents a code point. --- So it is a new name for CodePoint. Great. It does not sound very useful to me. I hope they don't do something as stupid as Python 3 does, converting all string data internally to UTF-32. > Off topic but I wonder if Lazarus/fpc uses something anything > similar to golang's rune's approach or looked into it. Yes but we call it "CodePoint" like rest of the world does. CodePoints are the easy part of Unicode, regardless of encoding! Look at the examples here: http://wiki.freepascal.org/UTF8_strings_and_characters They can handle pretty much any use case dealing with CodePoints. It is not difficult. It is easy. Your worries about complexity of Unicode are valid but the reason is combining CodePoints into user perceived characters. The rules are complex, there is normalization and its associated problems etc. No, neither FPC nor Lazarus have library code to deal with that yet. The goal is to have an enumerator for user perceived characters, just like LazUnicode unit has for encoding agnostic CodePoints. Juha From juha.manninen62 at gmail.com Fri Oct 21 13:33:46 2016 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Fri, 21 Oct 2016 14:33:46 +0300 Subject: [Lazarus] How to use strings properly with fixes_1_6 and FPC 3.0.0? In-Reply-To: References: <435f528d-260c-ff77-aa0c-c4dded0ec5cd@yahoo.com> <6a33e896-a1d6-4908-0dee-49cf23e764b8@yahoo.com> Message-ID: On Fri, Oct 21, 2016 at 2:13 PM, Gabor Boros via Lazarus wrote: > Same FCP same Lazarus. Why is there a difference in the result? You still did not read the wiki page: http://wiki.freepascal.org/Better_Unicode_Support_in_Lazarus Console programs are mentioned in many places. This is under "Usage in Lazarus": "For console programs (no LCL) a dependency for LazUtils must be added manually. LCL applications already have it through the LCL dependency." Juha From mailinglists at geldenhuys.co.uk Fri Oct 21 13:36:02 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Fri, 21 Oct 2016 12:36:02 +0100 Subject: [Lazarus] Chromium embedded on freebsd or firefox embedded In-Reply-To: References: Message-ID: <32ee5149-8cda-f5ce-be71-245cf972a23b@geldenhuys.co.uk> On 2016-10-21 12:23, Lars via Lazarus wrote: > but for small apps it increases > the download size significantly. Exactly. > When you dabbed with firefox embedded, was it a lazarus component? It's been a while, but I believe it was a Lazarus component. 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 fluisgirardi at gmail.com Fri Oct 21 13:51:28 2016 From: fluisgirardi at gmail.com (Fabio Luis Girardi) Date: Fri, 21 Oct 2016 09:51:28 -0200 Subject: [Lazarus] Anchordocking + Sparta, how dock object inspector into form editor Message-ID: Hi! I'm using AnchorDocking together with Sparta and work with these two are awesome. But is possible to dock the component list and object inspector into the form designer? It makes no sense to see the object inspector while I'm at source editor. -- The best regards, Fabio Luis Girardi PascalSCADA Project http://sourceforge.net/projects/pascalscada http://www.pascalscada.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From mse00000 at gmail.com Fri Oct 21 14:05:49 2016 From: mse00000 at gmail.com (Martin Schreiber) Date: Fri, 21 Oct 2016 14:05:49 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <5f4b6f4732235f2c578502f3e0781938.squirrel@gator3286.hostgator.com> References: <201610211011.48378.mse00000@gmail.com> <5f4b6f4732235f2c578502f3e0781938.squirrel@gator3286.hostgator.com> Message-ID: <201610211405.49623.mse00000@gmail.com> On Friday 21 October 2016 13:26:13 Lars via Lazarus wrote: > On Fri, October 21, 2016 2:11 am, Martin Schreiber via Lazarus wrote: > > On Friday 21 October 2016 09:51:38 Lars via Lazarus wrote: > >> I'm not so sure event driven programming is a must to become a > >> competent programmer, I would have to think about that. > > > > "Event driven" probably means that there is an event queue with a central > > toolkit-main-eventloop which dispatches the events instead a program > > specific flow control. > > What about a pure win32 API app written in C. Do you essentially reinvent > your own event system using callbacks with program flow control? Or the > win32 api has an event system in its api itself? Win32 API works with message queues. Martin From hnb.code at gmail.com Fri Oct 21 14:01:57 2016 From: hnb.code at gmail.com (Maciej Izak) Date: Fri, 21 Oct 2016 14:01:57 +0200 Subject: [Lazarus] Anchordocking + Sparta, how dock object inspector into form editor In-Reply-To: References: Message-ID: 2016-10-21 13:51 GMT+02:00 Fabio Luis Girardi via Lazarus < lazarus at lists.lazarus-ide.org>: > But is possible to dock the component list and object inspector into the > form designer? It makes no sense to see the object inspector while I'm at > source editor. Sorry - not yet. I have no plans for that feature in near future. Anyway will be possible to show/hide component list: https://www.youtube.com/watch?v=6FOjWCLDScQ&feature=youtu.be&t=236 -- Best regards, Maciej Izak -------------- next part -------------- An HTML attachment was scrubbed... URL: From joshyfun at gmail.com Fri Oct 21 14:04:02 2016 From: joshyfun at gmail.com (=?UTF-8?Q?Jos=c3=a9_Mejuto?=) Date: Fri, 21 Oct 2016 14:04:02 +0200 Subject: [Lazarus] Chromium embedded on freebsd or firefox embedded In-Reply-To: References: Message-ID: El 21/10/2016 a las 13:23, Lars via Lazarus escribió: > When you dabbed with firefox embedded, was it a lazarus component? Or did > you make calls directly to an API without using a component? Hello, Embeded Firefox is not possible anymore via XulRunner as embedded support has been dropped by Mozilla. The only way is to get Firefox sources and maintain something that can be embedded, but since since Firefox 40 +/- internat API is not frozen anymore, also projects like Thunderbird have troubles now to follow API changes. Firefox embedded does not work properly in Lazarus since Firefox 9 +/- and it is not possible to make it work unless forking Firefox xulrunner. -- From gaborboros at yahoo.com Fri Oct 21 14:24:47 2016 From: gaborboros at yahoo.com (Gabor Boros) Date: Fri, 21 Oct 2016 14:24:47 +0200 Subject: [Lazarus] How to use strings properly with fixes_1_6 and FPC 3.0.0? In-Reply-To: References: <435f528d-260c-ff77-aa0c-c4dded0ec5cd@yahoo.com> <6a33e896-a1d6-4908-0dee-49cf23e764b8@yahoo.com> Message-ID: <3f4f9a0b-81a0-7b31-e07f-73aea90ed5cc@yahoo.com> 2016. 10. 21. 12:38 keltezéssel, Juha Manninen via Lazarus írta: >> for i:=1 to UTF8Length(s) do Write(UTF8Copy(s,i,1)) > > No, it not a good solution! > I predict that most your code can still use byte indexing. At some > point you will get a Heureka-moment like "hey, I don't need the > codepoint index when doing this task!". Juha, thank you for your patience and sorry if I am a completely idiot but... :-) Why the below example better than a for loop with UTF8Length and UTF8Copy for go through the string? I hope my "Heureka-moment" coming shortly! :D http://wiki.freepascal.org/UTF8_strings_and_characters#Iterating_over_string_analysing_individual_codepoints Gabor From juha.manninen62 at gmail.com Fri Oct 21 14:59:38 2016 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Fri, 21 Oct 2016 15:59:38 +0300 Subject: [Lazarus] How to use strings properly with fixes_1_6 and FPC 3.0.0? In-Reply-To: <3f4f9a0b-81a0-7b31-e07f-73aea90ed5cc@yahoo.com> References: <435f528d-260c-ff77-aa0c-c4dded0ec5cd@yahoo.com> <6a33e896-a1d6-4908-0dee-49cf23e764b8@yahoo.com> <3f4f9a0b-81a0-7b31-e07f-73aea90ed5cc@yahoo.com> Message-ID: On Fri, Oct 21, 2016 at 3:24 PM, Gabor Boros via Lazarus wrote: > Why the below example better than a for loop with UTF8Length and UTF8Copy > for go through the string? Because it is MUCH faster. It scales linearly, O(n). Calling UTF8Length() and UTF8Copy() inside the loop makes it polynomial O(n^2) or worse depending on how many UTF8...() calls you have there. Yes, we have seen complaints that UTF-8 is unusable because you must use the slow UTF8Length() and UTF8Copy(), and UTF-16 is better because you can use fixed width S[i] indexing. That is obviously based on misunderstanding of both encodings. Hint: if you need to iterate CodePoints, you can also use the enumerator from LazUnicode unit. It uses the same concept as the example in wiki page. It allows this code: for ch in s do writeln('ch=',ch); and the same code even works in Delphi with UTF-16. Cool, ha!? Juha From m.e.sanliturk at gmail.com Fri Oct 21 15:20:52 2016 From: m.e.sanliturk at gmail.com (Mehmet Erol Sanliturk) Date: Fri, 21 Oct 2016 06:20:52 -0700 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <2abdc7c528d89aa16e535d0d6677e61a.squirrel@gator3286.hostgator.com> References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <6be99731f84dd3cd4176185537002d09.squirrel@gator3286.hostgator.com> <2abdc7c528d89aa16e535d0d6677e61a.squirrel@gator3286.hostgator.com> Message-ID: On Fri, Oct 21, 2016 at 12:51 AM, Lars via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > On Mon, October 17, 2016 7:32 pm, Mehmet Erol Sanliturk wrote: > > One obvious point is that an "event" driven programming knowledge is a > > must to become a competent programmer . The problem is how this can be > > learned . Without knowing how to program an algorithm when a related > event > > is occurred , will bring any one to nothing means ( not to a success ) . > > > > An interesting question is what is an event and isn't in some way or > another all programming based on events that occur? > > The concept of callbacks is very similar to events. you make a callback > when something happens, just like an event. This can be done even in old > turbopascal programs or console mode programs.. > > I'm not so sure event driven programming is a must to become a competent > programmer, I would have to think about that. Events could (may) force a > programmer to think about programs in a certain way... when there are > alternatives? or are events the only alternative just in another form > (callbacks, or calling procedures). It begs the question about whether > events are just procedures being called, which is the same as any > programming methodology since all programs "call procedures". > > Is a compiler event driven? A competent programmer could write a compiler, > or a parser. Are they necessary to have event driven architectures? > > i.e. is the fpc compiler event driven, even if not officially event driven > someone ended up reinventing events in it? From what I understand Michael > V. C.'s documentation tool is event driven which differs from the fpc > compiler. However I beg the question: is all programming event driven in > some way since events are just "calls to procedures". Of course that is > simplifying it, but "what is an event?" would be a good computing science > article to write. If I had any time.. > -- > _______________________________________________ > Please see the following pages : https://en.wikipedia.org/wiki/Event-driven_programming ( Event-driven programming ) https://en.wikipedia.org/wiki/Imperative_programming ( Imperative programming ) https://en.wikipedia.org/wiki/Category:Events_(computing) ( Category:Events (computing) ) https://en.wikipedia.org/wiki/Category:Programming_paradigms ( Category:Programming paradigms ) You can find plenty of information in the above pages and in their linked pages . Lazarus IDE : An example of event driven programming FPC : An example of imperative programming Mehmet Erol Sanliturk -------------- next part -------------- An HTML attachment was scrubbed... URL: From juergen.hestermann at gmx.de Fri Oct 21 16:08:32 2016 From: juergen.hestermann at gmx.de (=?UTF-8?Q?J=c3=bcrgen_Hestermann?=) Date: Fri, 21 Oct 2016 16:08:32 +0200 Subject: [Lazarus] How to use strings properly with fixes_1_6 and FPC 3.0.0? In-Reply-To: References: <435f528d-260c-ff77-aa0c-c4dded0ec5cd@yahoo.com> <6a33e896-a1d6-4908-0dee-49cf23e764b8@yahoo.com> <3f4f9a0b-81a0-7b31-e07f-73aea90ed5cc@yahoo.com> Message-ID: <2e7445a6-c01d-a206-2190-0a49289d6155@gmx.de> Am 2016-10-21 um 14:59 schrieb Juha Manninen via Lazarus: > On Fri, Oct 21, 2016 at 3:24 PM, Gabor Boros via Lazarus > wrote: >> Why the below example better than a for loop with UTF8Length and UTF8Copy >> for go through the string? > Because it is MUCH faster. It scales linearly, O(n). > Calling UTF8Length() and UTF8Copy() inside the loop makes it > polynomial O(n^2) or worse depending on how many UTF8...() calls you > have there. And again we are at the point where you need to understand what goes on under the hood... ;-) From juergen.hestermann at gmx.de Fri Oct 21 16:15:02 2016 From: juergen.hestermann at gmx.de (=?UTF-8?Q?J=c3=bcrgen_Hestermann?=) Date: Fri, 21 Oct 2016 16:15:02 +0200 Subject: [Lazarus] How to use strings properly with fixes_1_6 and FPC 3.0.0? In-Reply-To: <2717282d-30a5-7633-f1fe-a9eee369f32e@yahoo.com> References: <435f528d-260c-ff77-aa0c-c4dded0ec5cd@yahoo.com> <6a33e896-a1d6-4908-0dee-49cf23e764b8@yahoo.com> <29be6dee-a18d-d30e-6b99-ec37b20b3679@gmx.de> <2717282d-30a5-7633-f1fe-a9eee369f32e@yahoo.com> Message-ID: Am 2016-10-21 um 13:23 schrieb Gabor Boros via Lazarus: > I will know if somebody describe what a difference between á and an á characters in two points of my program. The problem is, that Unicode has a code point for "á" but also allows to compose this characters by having an "a" and an "´" printed over each over. I will never understand why this was allowed because I thought that Unicode was intruduced to overcome such issues by defining a huge number of code points directly. Nevertheless, if you have such a situation then you cannot search for a byte sequence as there are 2 possible representations of the same character. I have given up on taking care about such composed characters and assume that all Unicode strings are normalized. From juha.manninen62 at gmail.com Fri Oct 21 18:19:52 2016 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Fri, 21 Oct 2016 19:19:52 +0300 Subject: [Lazarus] How to use strings properly with fixes_1_6 and FPC 3.0.0? In-Reply-To: References: <435f528d-260c-ff77-aa0c-c4dded0ec5cd@yahoo.com> <6a33e896-a1d6-4908-0dee-49cf23e764b8@yahoo.com> <29be6dee-a18d-d30e-6b99-ec37b20b3679@gmx.de> <2717282d-30a5-7633-f1fe-a9eee369f32e@yahoo.com> Message-ID: On Fri, Oct 21, 2016 at 5:08 PM, Jürgen Hestermann via Lazarus wrote: > And again we are at the point where you need to understand what goes on > under the hood... ;-) Yes but that is true with any programming. I am truly happy that we have Unicode instead of the old system codepages. I remember text full of question marks earlier a lot but not any more. Things are getting better... I don't even know how the codepages worked when one text had many languages. I don't even care now because we have Unicode. :) On Fri, Oct 21, 2016 at 5:15 PM, Jürgen Hestermann via Lazarus wrote: > The problem is, that Unicode has a code point for "á" but > also allows to compose this characters by having an "a" > and an "´" printed over each over. > I will never understand why this was allowed because > I thought that Unicode was intruduced to overcome such > issues by defining a huge number of code points directly. > > Nevertheless, if you have such a situation then you cannot > search for a byte sequence as there are 2 possible representations > of the same character. That is all true although Gabor's problem was not caused by it. His LCL app used the default UTF-8 strings but the console program used Windows codepage. Adding to the confusion, Windows console codepage is different from its system codepage (if I have understood right). This is another reason to use the default UTF-8 system, it handles it all behind the scenes. > I have given up on taking care about such composed characters > and assume that all Unicode strings are normalized. I have understood the composed version (many codepoints / character) is the recommended normalized one. We must support it properly in future. The combining rules are extremely complex. Benjamin Rosseaux (BeRo in forum) has code for it. There was some other code, too. I must dive into it sometime in future. In fact we have simple code for combined accented characters in LazUnicode unit, despite of what I wrote earlier in this thread. It was basically copied from SynEdit. I will write another post... Juha From juha.manninen62 at gmail.com Fri Oct 21 23:16:34 2016 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Sat, 22 Oct 2016 00:16:34 +0300 Subject: [Lazarus] How to use strings properly with fixes_1_6 and FPC 3.0.0? In-Reply-To: References: <435f528d-260c-ff77-aa0c-c4dded0ec5cd@yahoo.com> Message-ID: On Fri, Oct 21, 2016 at 2:26 PM, Juha Manninen wrote: > No, neither FPC nor Lazarus have library code to deal with [combined CodePoints] yet. > The goal is to have an enumerator for user perceived characters, just > like LazUnicode unit has for encoding agnostic CodePoints. Sorry, that was not accurate. Unit LazUnicode already has TUnicodeCharacterEnumerator which is able to iterate combined accented Unicode characters. It calls either function UTF8IsCombining or UTF16IsCombining depending on the default encoding in use. Yes, Delphi and UTF-16 are supported. The code was basically copied from SynEdit and then ported also to UTF-16. It does not support all the complex rules of combining CodePoints, but it apparently works well for accented characters in western languages. This: operator Enumerator(A: String): TUnicodeCharacterEnumerator; would enable it for the for-in loop, but it is commented out now. The current for-in loop enumerator works with CodePoints. There is a test project in components/lazutils/test/LazUnicodeTest.lpi. It includes combining CodePoints, too. Please take a look if you are interested. Juha From lazarus at mfriebe.de Sat Oct 22 03:12:34 2016 From: lazarus at mfriebe.de (Martin Frb) Date: Sat, 22 Oct 2016 02:12:34 +0100 Subject: [Lazarus] How to use strings properly with fixes_1_6 and FPC 3.0.0? In-Reply-To: References: <435f528d-260c-ff77-aa0c-c4dded0ec5cd@yahoo.com> Message-ID: On 21/10/2016 22:16, Juha Manninen via Lazarus wrote: > UTF-16. It does not support all the complex rules of combining > CodePoints, but it apparently works well for accented characters in > western languages. > Which ones does it not support? When I added it to SynEdit it was complete. It had all the combinings that the utf8 standard had back then. (at least that I could find in the documentation) Of course if a new combining range is added, it will not contain it. If that is needed one needs an external (OS or otherwise) library, that can/will be updated on those occasions. Mind "combining codepoints" have nothing to do with how many codepoints will be represented by one glyph. "â" is one character. But it can be a single codepoint (in utf16 one code-unit or word // in utf8 several code-unit or byte), or 2 codepoints ("a" + combining "^"). "fi" are 2 chars. But the may be 2 or 1 glyph (ligature) It is my understanding (but I do not know for sure) that in some languages (such as Arabic) certain letter combinations form a single glyph (afaik/google see https://en.wikipedia.org/wiki/Hamzah combined with a letter). Though maybe it is considered 2 glyph? I do not know Arabic at all. Also in some scripts glyphs are displayed in an order different from their occurrence in the text. All of this however has nothing to do with combining codepoints, or what counts a character. From noreply at z505.com Sat Oct 22 04:19:14 2016 From: noreply at z505.com (Lars) Date: Fri, 21 Oct 2016 20:19:14 -0600 Subject: [Lazarus] Chromium embedded on freebsd or firefox embedded In-Reply-To: References: Message-ID: On Fri, October 21, 2016 6:04 am, José Mejuto via Lazarus wrote: > > Embeded Firefox is not possible anymore via XulRunner as embedded > support has been dropped by Mozilla. Really? I heard about them changing the architecture to a new embedded architecture and no longer supporting an old architecture in the new code base, but not dropping support entirely for the entire embedded system? Or lazarus is simply not yet supporting the new architecture they came up with? > Firefox embedded does not work properly in Lazarus since Firefox 9 +/- > and it is not possible to make it work unless forking Firefox xulrunner. Isn't there a new xulrunner architecutre they created to replace it.. that's what I remember reading. I will find a link to the page and report back here soon if I find it. From noreply at z505.com Sat Oct 22 05:10:09 2016 From: noreply at z505.com (Lars) Date: Fri, 21 Oct 2016 21:10:09 -0600 Subject: [Lazarus] Chromium embedded on freebsd or firefox embedded In-Reply-To: References: Message-ID: <112e6de3de0bf319f54e6dea76dd2416.squirrel@gator3286.hostgator.com> On Fri, October 21, 2016 8:19 pm, Lars wrote: >> Firefox embedded does not work properly in Lazarus since Firefox 9 +/- >> and it is not possible to make it work unless forking Firefox xulrunner. >> > > Isn't there a new xulrunner architecutre they created to replace it.. > that's what I remember reading. I will find a link to the page and report > back here soon if I find it. > As promised, links: https://github.com/zotero/translation-server/issues/24 Someone says that there is now something called a Firefox SDK or Gecko SDK instead of xulrunner... I wonder if it replaces it or is more complicated/difficult to use and not intended so much for embedding? From nc-gaertnma at netcologne.de Sat Oct 22 10:53:01 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Sat, 22 Oct 2016 10:53:01 +0200 Subject: [Lazarus] How to use strings properly with fixes_1_6 and FPC 3.0.0? In-Reply-To: References: <435f528d-260c-ff77-aa0c-c4dded0ec5cd@yahoo.com> Message-ID: <20161022105301.10e5c6f8@limapholos.matflo.wg> On Sat, 22 Oct 2016 02:12:34 +0100 Martin Frb via Lazarus wrote: >[...] > It is my understanding (but I do not know for sure) that in some > languages (such as Arabic) certain letter combinations form a single > glyph (afaik/google see https://en.wikipedia.org/wiki/Hamzah combined > with a letter). Though maybe it is considered 2 glyph? I do not know > Arabic at all. Maybe you mean ligatures? Many languages have them, even German: https://en.wikipedia.org/wiki/Typographic_ligature Scary: It may depend on the font what letters are combined to a ligature. Even English can have them. Mattias From juergen.hestermann at gmx.de Sat Oct 22 12:13:04 2016 From: juergen.hestermann at gmx.de (=?UTF-8?Q?J=c3=bcrgen_Hestermann?=) Date: Sat, 22 Oct 2016 12:13:04 +0200 Subject: [Lazarus] How to use strings properly with fixes_1_6 and FPC 3.0.0? In-Reply-To: <20161022105301.10e5c6f8@limapholos.matflo.wg> References: <435f528d-260c-ff77-aa0c-c4dded0ec5cd@yahoo.com> <20161022105301.10e5c6f8@limapholos.matflo.wg> Message-ID: Am 2016-10-22 um 10:53 schrieb Mattias Gaertner via Lazarus: > Maybe you mean ligatures? Many languages have them, even German: > https://en.wikipedia.org/wiki/Typographic_ligature I thought that ligatures are just a matter of the font but not the unicode representation? When I write a text which contains the two letters "fi" they should be two separate characters in my unicode string no matter whether they will be printed as a ligature on the printer or screen. So ligatures should not influence string encoding in FPC. Or am I missing something here? From juha.manninen62 at gmail.com Sat Oct 22 12:25:30 2016 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Sat, 22 Oct 2016 13:25:30 +0300 Subject: [Lazarus] How to use strings properly with fixes_1_6 and FPC 3.0.0? In-Reply-To: References: <435f528d-260c-ff77-aa0c-c4dded0ec5cd@yahoo.com> Message-ID: On Sat, Oct 22, 2016 at 4:12 AM, Martin Frb via Lazarus wrote: > Which ones does it not support? > When I added it to SynEdit it was complete. It had all the combinings that > the utf8 standard had back then. (at least that I could find in the > documentation) > > Of course if a new combining range is added, it will not contain it. If that > is needed one needs an external (OS or otherwise) library, that can/will be > updated on those occasions. > > Mind "combining codepoints" have nothing to do with how many codepoints will > be represented by one glyph. Ok, I was confusing the Unicode terms again. I guess the biggest complexity is in glyphs and ligatures. I still don't understand their details. However for a program that must care about Unicode, like a text layout app, the rules for combining codepoints and glyphs are equally important. Codepoints for one glyph should never be split or copied separately. Isn't it so? SynEdit is a text layout app, too. In that sense the function IsCombining is not enough for practical purposes. A comprehensive library function should take care of glyphs (+ other rules), too. I looked at Bero's PUCU and the other links: http://forum.lazarus.freepascal.org/index.php/topic,33064.msg214342.html#msg214342 but it went over my head. I must study the issue more later. * A reality check! * Despite problems and incompleteness of our Unicode support, it is actually better than most other solutions out there. Ok, most programming tools support Unicode somehow but people use them wrong. A good example is our forum SMF software. It deals with text layout and definitely should handle Unicode but it does not. Not even single Codepoints beyond BMP which should be the most easy case! No combining rules needed or anything. Try to add this text to a forum post: (I hope the mail SW can deal with it...) "Have 🍷 for FPC 💓 Lazarus." Now the fact is that code made with FPC / Lazarus using the LazUnicode functions and enumerators supports Unicode already much better than most code out there! Juha From juha.manninen62 at gmail.com Sat Oct 22 12:34:50 2016 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Sat, 22 Oct 2016 13:34:50 +0300 Subject: [Lazarus] How to use strings properly with fixes_1_6 and FPC 3.0.0? In-Reply-To: References: <435f528d-260c-ff77-aa0c-c4dded0ec5cd@yahoo.com> <20161022105301.10e5c6f8@limapholos.matflo.wg> Message-ID: On Sat, Oct 22, 2016 at 1:13 PM, Jürgen Hestermann via Lazarus wrote: > So ligatures should not influence string encoding in FPC. > Or am I missing something here? I guess it matters for a text layout software. It should not separate the two characters forming a ligature. I admit I don't know the issue, figuring out the details myself. Juha From joshyfun at gmail.com Sat Oct 22 12:59:29 2016 From: joshyfun at gmail.com (=?UTF-8?Q?Jos=c3=a9_Mejuto?=) Date: Sat, 22 Oct 2016 12:59:29 +0200 Subject: [Lazarus] Chromium embedded on freebsd or firefox embedded In-Reply-To: <112e6de3de0bf319f54e6dea76dd2416.squirrel@gator3286.hostgator.com> References: <112e6de3de0bf319f54e6dea76dd2416.squirrel@gator3286.hostgator.com> Message-ID: El 22/10/2016 a las 5:10, Lars via Lazarus escribió: > As promised, links: > > https://github.com/zotero/translation-server/issues/24 > > Someone says that there is now something called a Firefox SDK or Gecko SDK > instead of xulrunner... > > I wonder if it replaces it or is more complicated/difficult to use and not > intended so much for embedding? Hello, Yes XulRunner is being replaced by GeckoSDK, but the main difference is that XulRunner had an stable API (frozen) and some semi-stable APIs, so most base functions for embed are stable. This is now longer available in GeckoSDK where nothing is frozen, API can change from release to release and the only way to embed it is writing a C code that generates a plain C interface that must link against a moving target. It is expected that somebody write such library in a near future but each library will match an specific Gecko engine, not as in XulRunner where old code should work with modern Gecko. The decision was taken around Firefox 40 because the browser needs a major rewrite to handle things like multiprocess rendering which are (from developers point of view) impossible to keep running with current XulRunner architecture, so instead XulRunner n.0 they simply drop XulRunner and all the satellite projects around Firefox. I'll try later to find the relevant links I had found in the past about this topic, found after spending a lot of hours trying to make morend XulRunners work embedded in Lazarus. -- From joshyfun at gmail.com Sat Oct 22 15:25:46 2016 From: joshyfun at gmail.com (=?UTF-8?Q?Jos=c3=a9_Mejuto?=) Date: Sat, 22 Oct 2016 15:25:46 +0200 Subject: [Lazarus] Chromium embedded on freebsd or firefox embedded In-Reply-To: <112e6de3de0bf319f54e6dea76dd2416.squirrel@gator3286.hostgator.com> References: <112e6de3de0bf319f54e6dea76dd2416.squirrel@gator3286.hostgator.com> Message-ID: <8bf7386e-f04e-a684-0e4b-3846c84cd165@gmail.com> El 22/10/2016 a las 5:10, Lars via Lazarus escribió: >> Isn't there a new xulrunner architecutre they created to replace it.. >> that's what I remember reading. I will find a link to the page and report >> back here soon if I find it. > https://github.com/zotero/translation-server/issues/24 > Someone says that there is now something called a Firefox SDK or Gecko SDK > instead of xulrunner... > I wonder if it replaces it or is more complicated/difficult to use and not > intended so much for embedding? Hello, The link that explains almost anything: https://dutherenverseauborddelatable.wordpress.com/2016/03/07/the-gecko-monoculture/ And the link that shows the embedding problem: http://chrislord.net/index.php/2016/03/08/state-of-embedding-in-gecko/ -- From aradeonas at operamail.com Sat Oct 22 15:38:22 2016 From: aradeonas at operamail.com (Aradeonas) Date: Sat, 22 Oct 2016 06:38:22 -0700 Subject: [Lazarus] New methods code creation In-Reply-To: <20161019235333.4177ecec@limapholos.matflo.wg> References: <1474898460.2390332.737183681.48812426@webmail.messagingengine.com> <2d5600ec-62fb-2ace-3144-ed143fb40473@kluug.net> <20160926184503.523fa263@limapholos.matflo.wg> <3c83d28b-75c5-2557-cf7f-8c1bb75c3212@kluug.net> <1474909800.936520.737490361.65476419@webmail.messagingengine.com> <6b8b4daf-acad-7474-77f0-73b20cac1ffe@kluug.net> <1474913175.1666611.737547521.3F86BA55@webmail.messagingengine.com> <20160926202438.242e3f89@limapholos.matflo.wg> <792ea6b4-d872-3b93-f2dd-97020980dd73@kluug.net> <1474920269.1695994.737677385.21B3E9E2@webmail.messagingengine.com> <20161019235333.4177ecec@limapholos.matflo.wg> Message-ID: <1477143502.2973578.763983753.5B40C2ED@webmail.messagingengine.com> Thanks! Regards, Ara -- http://www.fastmail.com - The professional email service -------------- next part -------------- An HTML attachment was scrubbed... URL: From nc-gaertnma at netcologne.de Sat Oct 22 22:38:35 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Sat, 22 Oct 2016 22:38:35 +0200 Subject: [Lazarus] How to use strings properly with fixes_1_6 and FPC 3.0.0? In-Reply-To: References: <435f528d-260c-ff77-aa0c-c4dded0ec5cd@yahoo.com> <20161022105301.10e5c6f8@limapholos.matflo.wg> Message-ID: <20161022223835.61705226@limapholos.matflo.wg> On Sat, 22 Oct 2016 12:13:04 +0200 Jürgen Hestermann via Lazarus wrote: > Am 2016-10-22 um 10:53 schrieb Mattias Gaertner via Lazarus: > > Maybe you mean ligatures? Many languages have them, even German: > > https://en.wikipedia.org/wiki/Typographic_ligature > > I thought that ligatures are just a matter of the font > but not the unicode representation? > When I write a text which contains the two letters "fi" > they should be two separate characters in my unicode string > no matter whether they will be printed as a ligature on the printer or screen. > So ligatures should not influence string encoding in FPC. > Or am I missing something here? Ligatures are a group of different issues. The "fi" ligature is a "stylistic ligature", aka just a font issue and as such is always represented by the two Unicode codepoints. The wiki page describes various other types of ligatures, where the Unicode representation can vary. Languages don't care about programmers. Mattias From nc-gaertnma at netcologne.de Sat Oct 22 23:21:09 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Sat, 22 Oct 2016 23:21:09 +0200 Subject: [Lazarus] How to use strings properly with fixes_1_6 and FPC 3.0.0? In-Reply-To: References: <435f528d-260c-ff77-aa0c-c4dded0ec5cd@yahoo.com> Message-ID: <20161022232109.6b58ffc6@limapholos.matflo.wg> On Sat, 22 Oct 2016 13:25:30 +0300 Juha Manninen via Lazarus wrote: >[...] > I guess the biggest complexity is in glyphs and ligatures. I still > don't understand their details. There is nothing to understand. Some languages have irregular letters. Same as English has irregular verbs. You don't "understand" them, you simply learn them. As a programmer you don't need to learn them, but you should be aware that many languages can't be mapped to simple arrays of characters. > However for a program that must care about Unicode, like a text layout > app, the rules for combining codepoints and glyphs are equally > important. Codepoints for one glyph should never be split or copied > separately. Isn't it so? "Never" is wrong here. For example some editors allow to select the single letters of a ligature. Also when comparing words you may want to ignore the diacritical signs using the decomposed form of Unicode. But afaik you are right that most programs never have an issue with ligatures. Btw, we need a wiki page about collation. >[...] > Despite problems and incompleteness of our Unicode support, it is > actually better than most other solutions out there. > Ok, most programming tools support Unicode somehow but people use them wrong. > A good example is our forum SMF software. It deals with text layout > and definitely should handle Unicode but it does not. > Not even single Codepoints beyond BMP which should be the most easy > case! No combining rules needed or anything. Yes, that is basic Unicode encoding. No ligatures, no bidi. I agree that this is the minimum for supporting Unicode. Synedit goes much further. And the native widgets often have pretty good support for the language of the user. So the LCL controls using native widgets have automatically good Unicode support. Mattias From nc-gaertnma at netcologne.de Sat Oct 22 23:36:47 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Sat, 22 Oct 2016 23:36:47 +0200 Subject: [Lazarus] Help System with Chromium Embedded component In-Reply-To: References: <20161021111331.0846d181@limapholos.matflo.wg> <0690e875-8608-c93d-ce39-f86e7a0bf5e3@geldenhuys.co.uk> <20161021120507.33bf5fdd@limapholos.matflo.wg> Message-ID: <20161022233647.63d1d853@limapholos.matflo.wg> On Fri, 21 Oct 2016 12:13:32 +0100 Graeme Geldenhuys via Lazarus wrote: >[...] > Take the Free Pascal CHM help as an example - it is horrific looking. > The fpdoc's HTML output writer was clearly designed for online HTML > usage with popup browser windows and decent CSS support etc. The CHM > conversion of that gives broken links, unsupported features and bad > formatting. Is this a problem of the CHM producer or the CHM viewer? > It just gives the documentation a bad wrap. fpdoc should > have a dedicated CHM output writer. The same can be said for an ePub > HTML output writer (if that ever materializes). Mattias From mailinglists at geldenhuys.co.uk Sun Oct 23 01:24:41 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Sun, 23 Oct 2016 00:24:41 +0100 Subject: [Lazarus] Help System with Chromium Embedded component In-Reply-To: <20161022233647.63d1d853@limapholos.matflo.wg> References: <20161021111331.0846d181@limapholos.matflo.wg> <0690e875-8608-c93d-ce39-f86e7a0bf5e3@geldenhuys.co.uk> <20161021120507.33bf5fdd@limapholos.matflo.wg> <20161022233647.63d1d853@limapholos.matflo.wg> Message-ID: <0ccf92ea-c2ce-8c1d-cec1-bf0777619b41@geldenhuys.co.uk> On 2016-10-22 22:36, Mattias Gaertner via Lazarus wrote: > Is this a problem of the CHM producer or the CHM viewer? Both. The LaTeX-to-HTML conversion is definitely not great. Michael would agree on this one. Then taking that already bad HTML and converting in to CHM, makes the end result even worse. That doesn't do any justices for Michael's hard work in writing the documentation and having it beautifully presented (like the official PDF versions). fpdoc's HTML output is designed for online viewing with a web browser. What it generates and how it generates it is not always appropriate for offline viewing, and doesn't take into account CHM viewers and how they differ from web browsers like Firefox or Chrome. Hence my suggestion that a dedicated CHM output writer is needed for fpdoc. Viewing CHM files are also not equal with all CHM viewers. Although LHelp's HTML component has improved much, it is not a match to KCHMViewer, Microsoft's Help viewer or the likes - which use full blown embedded web browser components. For example, take a look at how Delphi's CHM help looks when viewed with KCHMViewer vs LHelp (1). LHelp has other flaws too... slow loading times (though that has improved), flaky search results, incomplete or missing TOC entries (compared to what other CHM viewers show for the same CHM file), toolbar arrow navigation that sometimes don't work, broken rendering of images (2). Then there are also useful features missing that every dedicated help viewer should have: ability for some user customisation like adjusting the font size or page background colour, user annotations (inline or otherwise), bookmarks, advanced search (match this but not that, match phrases etc). Many of LHelp's issues can be addressed, but LHelp doesn't receive much love. I guess the major problem is that CHM is widely considered a Windows-only file format, thus the default viewer is mostly Microsoft's built-in help viewer (when Windows is the platform). Considering that Lazarus promotes multi-platform support, other platforms need to live with the failures of LHelp, or look elsewhere like KCHMViewer - but the latter pulls in its own huge list of 3rd party dependencies. [1] http://geldenhuys.co.uk/~graemeg/temp/kchmviewer_vs_lhelp.png [2] http://geldenhuys.co.uk/~graemeg/temp/kchmviewer_vs_lhelp_2.png This discussion is nothing new. I remember mentioning these same issues some years ago. 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 juergen.hestermann at gmx.de Sun Oct 23 11:31:00 2016 From: juergen.hestermann at gmx.de (=?UTF-8?Q?J=c3=bcrgen_Hestermann?=) Date: Sun, 23 Oct 2016 11:31:00 +0200 Subject: [Lazarus] How to use strings properly with fixes_1_6 and FPC 3.0.0? In-Reply-To: <20161022223835.61705226@limapholos.matflo.wg> References: <435f528d-260c-ff77-aa0c-c4dded0ec5cd@yahoo.com> <20161022105301.10e5c6f8@limapholos.matflo.wg> <20161022223835.61705226@limapholos.matflo.wg> Message-ID: Am 2016-10-22 um 22:38 schrieb Mattias Gaertner via Lazarus: > Languages don't care about programmers. True. But Unicode should have cared. It was made for its use on computers. Pressing each and every language peculiarity into Unicode was a mistake and made Unicode so hard to use. From nc-gaertnma at netcologne.de Sun Oct 23 11:40:19 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Sun, 23 Oct 2016 11:40:19 +0200 Subject: [Lazarus] How to use strings properly with fixes_1_6 and FPC 3.0.0? In-Reply-To: References: <435f528d-260c-ff77-aa0c-c4dded0ec5cd@yahoo.com> <20161022105301.10e5c6f8@limapholos.matflo.wg> <20161022223835.61705226@limapholos.matflo.wg> Message-ID: <20161023114019.3ab35773@limapholos.matflo.wg> On Sun, 23 Oct 2016 11:31:00 +0200 Jürgen Hestermann via Lazarus wrote: > Am 2016-10-22 um 22:38 schrieb Mattias Gaertner via Lazarus: > > Languages don't care about programmers. > > True. > But Unicode should have cared. > It was made for its use on computers. > Pressing each and every language peculiarity > into Unicode was a mistake and > made Unicode so hard to use. No one forces you to consider every "language peculiarity". Mattias From larrydalton71 at gmail.com Mon Oct 24 00:07:22 2016 From: larrydalton71 at gmail.com (Larry Dalton) Date: Sun, 23 Oct 2016 17:07:22 -0500 Subject: [Lazarus] Mouse move and mouse click Message-ID: I am trying to compile and use lazmouseandkeyinput.lpk on Linux Mint 17. I open and compile it with no problem, but when I add it to a project and try to build it I get a linking error. Sent from my iPhone From Special at Joepgen.com Mon Oct 24 01:08:33 2016 From: Special at Joepgen.com (Special) Date: Mon, 24 Oct 2016 01:08:33 +0200 Subject: [Lazarus] Mouse move and mouse click In-Reply-To: References: Message-ID: <58b0b228-53ed-8a20-6e96-47c4df4b27e7@Joepgen.com> Am 24.10.2016 um 00:07 schrieb Larry Dalton via Lazarus: > I am trying to compile and use lazmouseandkeyinput.lpk on Linux Mint 17. I open and compile it with no problem, but when I add it to a project and try to build it I get a linking error. > > Sent from my iPhone What error exactly? From larrydalton71 at gmail.com Mon Oct 24 01:27:57 2016 From: larrydalton71 at gmail.com (Larry Dalton) Date: Sun, 23 Oct 2016 18:27:57 -0500 Subject: [Lazarus] Mouse move and mouse click In-Reply-To: <58b0b228-53ed-8a20-6e96-47c4df4b27e7@Joepgen.com> References: <58b0b228-53ed-8a20-6e96-47c4df4b27e7@Joepgen.com> Message-ID: On the .lpr page Exit code 256, Error: Error while linking Sent from my iPhone > On Oct 23, 2016, at 18:08, Special via Lazarus wrote: > >> Am 24.10.2016 um 00:07 schrieb Larry Dalton via Lazarus: >> I am trying to compile and use lazmouseandkeyinput.lpk on Linux Mint 17. I open and compile it with no problem, but when I add it to a project and try to build it I get a linking error. >> >> Sent from my iPhone > What error exactly? > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus From noreply at z505.com Mon Oct 24 01:34:30 2016 From: noreply at z505.com (Lars) Date: Sun, 23 Oct 2016 17:34:30 -0600 Subject: [Lazarus] Help System with Chromium Embedded component In-Reply-To: <0ccf92ea-c2ce-8c1d-cec1-bf0777619b41@geldenhuys.co.uk> References: <20161021111331.0846d181@limapholos.matflo.wg> <0690e875-8608-c93d-ce39-f86e7a0bf5e3@geldenhuys.co.uk> <20161021120507.33bf5fdd@limapholos.matflo.wg> <20161022233647.63d1d853@limapholos.matflo.wg> <0ccf92ea-c2ce-8c1d-cec1-bf0777619b41@geldenhuys.co.uk> Message-ID: <720ab092ae799b63946c94c8842c0b6e.squirrel@gator3286.hostgator.com> Now that I think about my post about using chromium embedded for a help engine, the issue I see is that it's a large dependency .. so for small applications that are say 1MB large, and you want to supply a help system with it... all of a sudden the 1mb exe has to be shipped with a gazillion other files that wouldn't be needed with a more simple format. Still, I think I will try to release a help system for powtils using chromium embedded, as an offline experiment with CGI (no web server needed). However this will take time, and I almost feel like I posted that chromium idea drunk, even though I was not drinking. On Sat, October 22, 2016 5:24 pm, Graeme Geldenhuys via Lazarus wrote: > On 2016-10-22 22:36, Mattias Gaertner via Lazarus wrote: > >> Is this a problem of the CHM producer or the CHM viewer? >> > > Both. The LaTeX-to-HTML conversion is definitely not great. Michael > would agree on this one. Then taking that already bad HTML and converting > in to CHM, makes the end result even worse. That doesn't do any justices > for Michael's hard work in writing the documentation and having it > beautifully presented (like the official PDF versions). .... From noreply at z505.com Mon Oct 24 01:49:00 2016 From: noreply at z505.com (Lars) Date: Sun, 23 Oct 2016 17:49:00 -0600 Subject: [Lazarus] Chromium embedded on freebsd or firefox embedded In-Reply-To: References: <112e6de3de0bf319f54e6dea76dd2416.squirrel@gator3286.hostgator.com> Message-ID: <636641d02bfe00df77dbcc3c25de2529.squirrel@gator3286.hostgator.com> On Sat, October 22, 2016 4:59 am, José Mejuto via Lazarus wrote: > Hello, > > > Yes XulRunner is being replaced by GeckoSDK, but the main difference is > that XulRunner had an stable API (frozen) and some semi-stable APIs, so > most base functions for embed are stable. This is now longer available in > GeckoSDK where nothing is frozen, API can change from release to > release and the only way to embed it is writing a C code that generates a > plain C interface that must link against a moving target. > I see! You certainly are very knowledgeable about the subject and have done a lot of research on it. Now it makes sense to me more. This api that continually changes, reminds me of MySQL. I wrote web programs only to find out they broke, when mysql changed their API, and then freepascal had to release a newer file that linked to the DLL. It's a nightmare when api continually changes. I can see them (firefox) changing the architecture to support multiprocess though. .... > I'll try later to find the relevant links I had found in the past about > this topic, found after spending a lot of hours trying to make morend > XulRunners work embedded in Lazarus. > Your knowledge on the subject is significant! Thanks. From noreply at z505.com Mon Oct 24 02:19:32 2016 From: noreply at z505.com (Lars) Date: Sun, 23 Oct 2016 18:19:32 -0600 Subject: [Lazarus] Chromium embedded on freebsd or firefox embedded In-Reply-To: <8bf7386e-f04e-a684-0e4b-3846c84cd165@gmail.com> References: <112e6de3de0bf319f54e6dea76dd2416.squirrel@gator3286.hostgator.com> <8bf7386e-f04e-a684-0e4b-3846c84cd165@gmail.com> Message-ID: <776c36ce96b171ea46446446fa6fdae9.squirrel@gator3286.hostgator.com> On Sat, October 22, 2016 7:25 am, José Mejuto via Lazarus wrote: > > The link that explains almost anything: > > > https://dutherenverseauborddelatable.wordpress.com/2016/03/07/the-gecko-m > onoculture/ > > And the link that shows the embedding problem: > > > http://chrislord.net/index.php/2016/03/08/state-of-embedding-in-gecko/ > Those are some interesting reads. It confirms my gut instinct to choose chromium embedded (CEF) for development, instead of mozilla embedded, as chromium embedded seems more designed for embedding at this stage than the more immature firefox code. I wonder how often chromium embedded breaks their api, or changes the V8 engine so that old stuff no longer works. One thing I'd really like is a single DLL to ship with an application instead of mounds and mounds of files that these embedded solutions require. However I guess that's not going to happen. From juha.manninen62 at gmail.com Mon Oct 24 11:21:40 2016 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Mon, 24 Oct 2016 12:21:40 +0300 Subject: [Lazarus] Mouse move and mouse click In-Reply-To: References: <58b0b228-53ed-8a20-6e96-47c4df4b27e7@Joepgen.com> Message-ID: No linking error here on Manjaro Linux with Lazarus trunk and FPC 3.0. Try a clean build of everything. BTW, you forgot to mention your FPC / Lazarus versions. Juha From mschnell at lumino.de Mon Oct 24 11:57:41 2016 From: mschnell at lumino.de (Michael Schnell) Date: Mon, 24 Oct 2016 11:57:41 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <2abdc7c528d89aa16e535d0d6677e61a.squirrel@gator3286.hostgator.com> References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <6be99731f84dd3cd4176185537002d09.squirrel@gator3286.hostgator.com> <2abdc7c528d89aa16e535d0d6677e61a.squirrel@gator3286.hostgator.com> Message-ID: <284431ce-714c-cff4-c895-2514094eb54c@lumino.de> On 21.10.2016 09:51, Lars via Lazarus wrote: > The concept of callbacks is very similar to events. The difference is that with a callback you usually know both sides and hence how exactly it is called, while with an event (especially when fired by the LCL on behalf of something that happens in the GUI, aka RAD) you don't need to know exactly how and why it is fired, you just place your user code in it and are happy (at least if you are not a nerd like myself). -Michael From mschnell at lumino.de Mon Oct 24 12:03:08 2016 From: mschnell at lumino.de (Michael Schnell) Date: Mon, 24 Oct 2016 12:03:08 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <201610211405.49623.mse00000@gmail.com> References: <201610211011.48378.mse00000@gmail.com> <5f4b6f4732235f2c578502f3e0781938.squirrel@gator3286.hostgator.com> <201610211405.49623.mse00000@gmail.com> Message-ID: <98d56175-02c6-5b7d-1055-ca1a672fb1a2@lumino.de> On 21.10.2016 14:05, Martin Schreiber via Lazarus wrote: > Win32 API works with message queues. Happily, the application programmer does not need to know about that, as the LCL completely hides the underlying complexity. He sees the same type of "GUI"-events, independent of running on Winx (OS-introduced message queues) or Linux (Event Queues implemented by the LCL itself) (The reality is even more complex). -Michael From mschnell at lumino.de Mon Oct 24 12:13:58 2016 From: mschnell at lumino.de (Michael Schnell) Date: Mon, 24 Oct 2016 12:13:58 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <8430a9a8-115c-3eaa-296a-74708b42ee93@gmx.de> References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <6be99731f84dd3cd4176185537002d09.squirrel@gator3286.hostgator.com> <5b803e46-0bab-f5d2-e5c2-64f1ac4c90ea@lumino.de> <69bc7829-9b5c-debd-5794-581b701eba21@gmx.de> <0d466493-3a52-0b38-503e-ee5372e48f73@lumino.de> <8430a9a8-115c-3eaa-296a-74708b42ee93@gmx.de> Message-ID: On 18.10.2016 17:16, Jürgen Hestermann via Lazarus wrote: > > Yes, therefore start with simple procedural (console) > programs that let them have immediate success with > all the elementary things that a program consists of > (variables/types, loops, commands, etc.). > Yep. Satisfying for a Nerd, but it does not get something useful done and hence frustrating for a beginning application developer. > > If you do it the other way round you only delay the date > of frustration but you do not avoid it. That is true if (s)he one day will be confronted with large, complex, unusual or critical tasks. -Michael From mschnell at lumino.de Mon Oct 24 12:20:28 2016 From: mschnell at lumino.de (Michael Schnell) Date: Mon, 24 Oct 2016 12:20:28 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <793c05c4-536f-7bd6-7ac0-c474041fddfa@gmx.de> References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <6be99731f84dd3cd4176185537002d09.squirrel@gator3286.hostgator.com> <5b803e46-0bab-f5d2-e5c2-64f1ac4c90ea@lumino.de> <793c05c4-536f-7bd6-7ac0-c474041fddfa@gmx.de> Message-ID: <83921a7c-a7af-fd11-1198-717c1c8e2f95@lumino.de> On 21.10.2016 11:09, Jürgen Hestermann via Lazarus wrote: > What is the use of a program? Entertainment? Nowadays in 90% of the usage exactly this. Maybe other usage cases are more "important", but still the money is made with Entertainment. -Michael From mschnell at lumino.de Mon Oct 24 12:28:36 2016 From: mschnell at lumino.de (Michael Schnell) Date: Mon, 24 Oct 2016 12:28:36 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <34e032a0-2a68-09c2-19e0-ef390f78d3da@geldenhuys.co.uk> <430d7a68-0e1c-8e81-a87f-c9ef4e7ff3bd@lumino.de> <4ce22310-4fee-9b37-651f-1685ad90163b@geldenhuys.co.uk> Message-ID: <71203abe-b472-2534-f365-0dce502a607a@lumino.de> On 21.10.2016 10:12, Lars via Lazarus wrote: > Today's bloatware applications are so large no one can understand them IMHO, you did a good job to scare everybody away from even thinking about starting to try programming. So we should just stop "Teaching Pascal at College". -Michael From mschnell at lumino.de Mon Oct 24 12:36:42 2016 From: mschnell at lumino.de (Michael Schnell) Date: Mon, 24 Oct 2016 12:36:42 +0200 Subject: [Lazarus] How to use strings properly with fixes_1_6 and FPC 3.0.0? In-Reply-To: <6a33e896-a1d6-4908-0dee-49cf23e764b8@yahoo.com> References: <435f528d-260c-ff77-aa0c-c4dded0ec5cd@yahoo.com> <6a33e896-a1d6-4908-0dee-49cf23e764b8@yahoo.com> Message-ID: <16f7943b-2e75-1465-f7c2-b0518f152769@lumino.de> On 21.10.2016 12:05, Gabor Boros via Lazarus wrote: > 2016. 10. 21. 10:25 keltezéssel, Juha Manninen via Lazarus írta: >> * Please read the wiki page ... > > I read, I read but if contains buggy example... ;-) > > I need a quick and a rock solid solution. AFAIK, the only decent advice is never to use the numbers in Pos() / Length() / Copy() / Delete() for anything else tan with these functions. don't try to do any interpretation of these numbers. Never use the term "Character". -Michael From juergen.hestermann at gmx.de Mon Oct 24 12:39:12 2016 From: juergen.hestermann at gmx.de (=?UTF-8?Q?J=c3=bcrgen_Hestermann?=) Date: Mon, 24 Oct 2016 12:39:12 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <284431ce-714c-cff4-c895-2514094eb54c@lumino.de> References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <6be99731f84dd3cd4176185537002d09.squirrel@gator3286.hostgator.com> <2abdc7c528d89aa16e535d0d6677e61a.squirrel@gator3286.hostgator.com> <284431ce-714c-cff4-c895-2514094eb54c@lumino.de> Message-ID: Am 2016-10-24 um 11:57 schrieb Michael Schnell via Lazarus: > On 21.10.2016 09:51, Lars via Lazarus wrote: >> The concept of callbacks is very similar to events. > The difference is that with a callback you usually know both sides and hence how exactly it is called, > while with an event (especially when fired by the LCL on behalf of something that happens in the GUI, aka RAD) > you don't need to know exactly how and why it is fired, you just place your user code in it and are happy (at least if you are not a nerd like myself). You cannot "be happy" if you don't know exactly when an event is fired. It is of course important to know that. Otherwise you only assume something (that must not be true). The discussions about events fired by the user but not when changes are done by code showed this clearly. From juergen.hestermann at gmx.de Mon Oct 24 12:41:30 2016 From: juergen.hestermann at gmx.de (=?UTF-8?Q?J=c3=bcrgen_Hestermann?=) Date: Mon, 24 Oct 2016 12:41:30 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <6be99731f84dd3cd4176185537002d09.squirrel@gator3286.hostgator.com> <5b803e46-0bab-f5d2-e5c2-64f1ac4c90ea@lumino.de> <69bc7829-9b5c-debd-5794-581b701eba21@gmx.de> <0d466493-3a52-0b38-503e-ee5372e48f73@lumino.de> <8430a9a8-115c-3eaa-296a-74708b42ee93@gmx.de> Message-ID: <591b1044-917b-85ce-cdc6-4874e8ac112e@gmx.de> Am 2016-10-24 um 12:13 schrieb Michael Schnell via Lazarus: > On 18.10.2016 17:16, Jürgen Hestermann via Lazarus wrote: >> Yes, therefore start with simple procedural (console) >> programs that let them have immediate success with >> all the elementary things that a program consists of >> (variables/types, loops, commands, etc.). > Yep. Satisfying for a Nerd, but it does not get something useful done and hence frustrating for a beginning application developer. You mean it is possible to write a program with Free Pascal without knowing about variables, loops, etc.? I doubt this. From juergen.hestermann at gmx.de Mon Oct 24 12:51:23 2016 From: juergen.hestermann at gmx.de (=?UTF-8?Q?J=c3=bcrgen_Hestermann?=) Date: Mon, 24 Oct 2016 12:51:23 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <83921a7c-a7af-fd11-1198-717c1c8e2f95@lumino.de> References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <6be99731f84dd3cd4176185537002d09.squirrel@gator3286.hostgator.com> <5b803e46-0bab-f5d2-e5c2-64f1ac4c90ea@lumino.de> <793c05c4-536f-7bd6-7ac0-c474041fddfa@gmx.de> <83921a7c-a7af-fd11-1198-717c1c8e2f95@lumino.de> Message-ID: <03a2221a-b101-3af2-e994-17babef89bd4@gmx.de> Am 2016-10-24 um 12:20 schrieb Michael Schnell via Lazarus: > On 21.10.2016 11:09, Jürgen Hestermann via Lazarus wrote: >> What is the use of a program? Entertainment? > Nowadays in 90% of the usage exactly this. > Maybe other usage cases are more "important", but still the money is made with Entertainment. There may be a misunderstanding: I did not ask whether the *purpose* of a program is entertainment but whether *programming* it has to be entertainment? The aim of programming should be to get a program running (as the programmer wants it) not to spend time with juggling gaudy pictures, icons and videos. In the end, it is somehow "entertaining" if a program works but this requires knowledge about how the programming language works. Ignoring all facts will never lead to a satisfying programming experience. From mschnell at lumino.de Mon Oct 24 12:53:31 2016 From: mschnell at lumino.de (Michael Schnell) Date: Mon, 24 Oct 2016 12:53:31 +0200 Subject: [Lazarus] How to use strings properly with fixes_1_6 and FPC 3.0.0? In-Reply-To: References: <435f528d-260c-ff77-aa0c-c4dded0ec5cd@yahoo.com> <20161022105301.10e5c6f8@limapholos.matflo.wg> <20161022223835.61705226@limapholos.matflo.wg> Message-ID: <3ba47a03-9d81-9dd0-eb42-ef9f80a31eb0@lumino.de> On 23.10.2016 11:31, Jürgen Hestermann via Lazarus wrote: > > But Unicode should have cared. > It was made for its use on computers. I don't think so. I suppose it was defined top allow for printing out digital documents in mind, but not with working with them. At least this i what the outcome suggests: printing works just fine, but even trying to find out a very short information is identical is not decently possible. -Michael From joshyfun at gmail.com Mon Oct 24 13:33:12 2016 From: joshyfun at gmail.com (=?UTF-8?Q?Jos=c3=a9_Mejuto?=) Date: Mon, 24 Oct 2016 13:33:12 +0200 Subject: [Lazarus] Chromium embedded on freebsd or firefox embedded In-Reply-To: <776c36ce96b171ea46446446fa6fdae9.squirrel@gator3286.hostgator.com> References: <112e6de3de0bf319f54e6dea76dd2416.squirrel@gator3286.hostgator.com> <8bf7386e-f04e-a684-0e4b-3846c84cd165@gmail.com> <776c36ce96b171ea46446446fa6fdae9.squirrel@gator3286.hostgator.com> Message-ID: El 24/10/2016 a las 2:19, Lars via Lazarus escribió: > Those are some interesting reads. It confirms my gut instinct to choose > chromium embedded (CEF) for development, instead of mozilla embedded, as > chromium embedded seems more designed for embedding at this stage than the > more immature firefox code. Hello, Yes, currently Chromium seems to be better, but anyway it will need a lot of work starting from the CEF as if my brain serves me CEF API is C++ so you will find the same problem as Qt interface, a very big DLL/so to convert C++ to plain C functions that will need a quite good maintain. > I wonder how often chromium embedded breaks their api, or changes the V8 > engine so that old stuff no longer works. As far as I know it is quite stable now. > One thing I'd really like is a single DLL to ship with an application > instead of mounds and mounds of files that these embedded solutions > require. However I guess that's not going to happen. No for sure, that will not happen :) unless you use some dirty tricks. In the past I was able to "inject" 3 or 4 DLLs in my EXE and use them, but only in 32 bits Windows and I was unable to port the code to the 64 bits windows loader (it basically performs the same actions Windows do when load a DLL from disk, but the function loads it from a resource and adjust the call pointers and other things as Windows will do it). Of course that method will not with all DLLs. -- From nc-gaertnma at netcologne.de Mon Oct 24 13:34:04 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Mon, 24 Oct 2016 13:34:04 +0200 Subject: [Lazarus] How to use strings properly with fixes_1_6 and FPC 3.0.0? In-Reply-To: <3ba47a03-9d81-9dd0-eb42-ef9f80a31eb0@lumino.de> References: <435f528d-260c-ff77-aa0c-c4dded0ec5cd@yahoo.com> <20161022105301.10e5c6f8@limapholos.matflo.wg> <20161022223835.61705226@limapholos.matflo.wg> <3ba47a03-9d81-9dd0-eb42-ef9f80a31eb0@lumino.de> Message-ID: <20161024133404.266a11d1@limapholos.matflo.wg> On Mon, 24 Oct 2016 12:53:31 +0200 Michael Schnell via Lazarus wrote: > On 23.10.2016 11:31, Jürgen Hestermann via Lazarus wrote: > > > > But Unicode should have cared. > > It was made for its use on computers. > I don't think so. > > I suppose it was defined top allow for printing out digital documents in > mind, but not with working with them. Non sense. The various normal forms aren't needed for printing, but for "working with them". Same for the various encodings like UTF-8 and UTF-16. Think about the other type systems with diacritics like TeX. That is made for printing documents, not for working with them. > At least this i what the outcome suggests: printing works just fine, but > even trying to find out a very short information is identical is not > decently possible. That depends on what you mean with "identical". I guess you mean the topic "collation". It would be nice if someone with some knowledge about that topic could start a wiki page or fpdoc topic to list the common functions for them. Mattias From mschnell at lumino.de Mon Oct 24 14:35:28 2016 From: mschnell at lumino.de (Michael Schnell) Date: Mon, 24 Oct 2016 14:35:28 +0200 Subject: [Lazarus] How to use strings properly with fixes_1_6 and FPC 3.0.0? In-Reply-To: <20161024133404.266a11d1@limapholos.matflo.wg> References: <435f528d-260c-ff77-aa0c-c4dded0ec5cd@yahoo.com> <20161022105301.10e5c6f8@limapholos.matflo.wg> <20161022223835.61705226@limapholos.matflo.wg> <3ba47a03-9d81-9dd0-eb42-ef9f80a31eb0@lumino.de> <20161024133404.266a11d1@limapholos.matflo.wg> Message-ID: On 24.10.2016 13:34, Mattias Gaertner via Lazarus wrote: > That depends on what you mean with "identical". You are absolutely right. Very sorry for being critical while being vague myself (again typing faster than thinking) ;) . I meant to point out exactly this ambiguity: identically coded vs. identically looking (e.g. combining codepoints), vs identical presumed letters if looking differently (ligatures), ... -Michael From mschnell at lumino.de Mon Oct 24 14:35:28 2016 From: mschnell at lumino.de (Michael Schnell) Date: Mon, 24 Oct 2016 14:35:28 +0200 Subject: [Lazarus] How to use strings properly with fixes_1_6 and FPC 3.0.0? In-Reply-To: <20161024133404.266a11d1@limapholos.matflo.wg> References: <435f528d-260c-ff77-aa0c-c4dded0ec5cd@yahoo.com> <20161022105301.10e5c6f8@limapholos.matflo.wg> <20161022223835.61705226@limapholos.matflo.wg> <3ba47a03-9d81-9dd0-eb42-ef9f80a31eb0@lumino.de> <20161024133404.266a11d1@limapholos.matflo.wg> Message-ID: On 24.10.2016 13:34, Mattias Gaertner via Lazarus wrote: > That depends on what you mean with "identical". You are absolutely right. Very sorry for being critical while being vague myself (again typing faster than thinking) ;) . I meant to point out exactly this ambiguity: identically coded vs. identically looking (e.g. combining codepoints), vs identical presumed letters if looking differently (ligatures), ... -Michael From nc-gaertnma at netcologne.de Mon Oct 24 15:09:26 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Mon, 24 Oct 2016 15:09:26 +0200 Subject: [Lazarus] How to use strings properly with fixes_1_6 and FPC 3.0.0? In-Reply-To: References: <435f528d-260c-ff77-aa0c-c4dded0ec5cd@yahoo.com> <20161022105301.10e5c6f8@limapholos.matflo.wg> <20161022223835.61705226@limapholos.matflo.wg> <3ba47a03-9d81-9dd0-eb42-ef9f80a31eb0@lumino.de> <20161024133404.266a11d1@limapholos.matflo.wg> Message-ID: <20161024150926.0197cf5b@limapholos.matflo.wg> On Mon, 24 Oct 2016 14:35:28 +0200 Michael Schnell wrote: >[...] but even trying to find out a very short information is identical is not decently possible. >[...] > I meant to point out exactly this ambiguity: > > identically coded vs. identically looking (e.g. combining codepoints), > vs identical presumed letters if looking differently (ligatures), ... About "identically coded": That is "decently possible" - simple string/byte comparison. About "identically looking": I guess you mean composed vs decomposed form. That is converting normal forms. There are functions to normalize, but the information is scattered and it would be nice if someone would write a page. About "ligatures": I guess you mean "collation". Same problem. Needs better documentation. Basically you are asking for various compare and normalization functions. These functions exist. Mattias From mschnell at lumino.de Mon Oct 24 16:03:11 2016 From: mschnell at lumino.de (Michael Schnell) Date: Mon, 24 Oct 2016 16:03:11 +0200 Subject: [Lazarus] How to use strings properly with fixes_1_6 and FPC 3.0.0? In-Reply-To: <20161024150926.0197cf5b@limapholos.matflo.wg> References: <435f528d-260c-ff77-aa0c-c4dded0ec5cd@yahoo.com> <20161022105301.10e5c6f8@limapholos.matflo.wg> <20161022223835.61705226@limapholos.matflo.wg> <3ba47a03-9d81-9dd0-eb42-ef9f80a31eb0@lumino.de> <20161024133404.266a11d1@limapholos.matflo.wg> <20161024150926.0197cf5b@limapholos.matflo.wg> Message-ID: On 24.10.2016 15:09, Mattias Gaertner via Lazarus wrote: > These functions exist. This of course is great (while the lack of documentation supposedly makes them hard to use). In fact I am not asking, but the question is part of the OP's problem. And here I wanted to point out the ambiguity of the term "identical" on that behalf. -Michael From trayres at gmail.com Mon Oct 24 18:11:34 2016 From: trayres at gmail.com (Travis Ayres) Date: Mon, 24 Oct 2016 09:11:34 -0700 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <6be99731f84dd3cd4176185537002d09.squirrel@gator3286.hostgator.com> <5b803e46-0bab-f5d2-e5c2-64f1ac4c90ea@lumino.de> <793c05c4-536f-7bd6-7ac0-c474041fddfa@gmx.de> <83921a7c-a7af-fd11-1198-717c1c8e2f95@lumino.de> <03a2221a-b101-3af2-e994-17babef89bd4@gmx.de> Message-ID: With over 100 replies, we could have already written a course outline, introduction, and some notes about events and RAD programming, maybe also the observer pattern? On Oct 24, 2016 3:51 AM, "Jürgen Hestermann via Lazarus" < lazarus at lists.lazarus-ide.org> wrote: Am 2016-10-24 um 12:20 schrieb Michael Schnell via Lazarus: > On 21.10.2016 11:09, Jürgen Hestermann via Lazarus wrote: >> What is the use of a program? Entertainment? > Nowadays in 90% of the usage exactly this. > Maybe other usage cases are more "important", but still the money is made with Entertainment. There may be a misunderstanding: I did not ask whether the *purpose* of a program is entertainment but whether *programming* it has to be entertainment? The aim of programming should be to get a program running (as the programmer wants it) not to spend time with juggling gaudy pictures, icons and videos. In the end, it is somehow "entertaining" if a program works but this requires knowledge about how the programming language works. Ignoring all facts will never lead to a satisfying programming experience. -- _______________________________________________ Lazarus mailing list Lazarus at lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: From rgrunsky at sympatico.ca Mon Oct 24 19:47:26 2016 From: rgrunsky at sympatico.ca (Rolf Grunsky) Date: Mon, 24 Oct 2016 13:47:26 -0400 Subject: [Lazarus] How to use strings properly with fixes_1_6 and FPC 3.0.0? In-Reply-To: References: <435f528d-260c-ff77-aa0c-c4dded0ec5cd@yahoo.com> Message-ID: <87e1a148-6d6f-14ce-63b4-024a3a68f80a@sympatico.ca> On 10/22/2016 06:25 AM, Juha Manninen via Lazarus wrote: > On Sat, Oct 22, 2016 at 4:12 AM, Martin Frb via Lazarus > wrote: >> Which ones does it not support? >> When I added it to SynEdit it was complete. It had all the combinings that >> the utf8 standard had back then. (at least that I could find in the >> documentation) >> >> Of course if a new combining range is added, it will not contain it. If that >> is needed one needs an external (OS or otherwise) library, that can/will be >> updated on those occasions. >> >> Mind "combining codepoints" have nothing to do with how many codepoints will >> be represented by one glyph. > > Ok, I was confusing the Unicode terms again. > I guess the biggest complexity is in glyphs and ligatures. I still > don't understand their details. > However for a program that must care about Unicode, like a text layout > app, the rules for combining codepoints and glyphs are equally > important. Codepoints for one glyph should never be split or copied > separately. Isn't it so? > SynEdit is a text layout app, too. > In that sense the function IsCombining is not enough for practical > purposes. A comprehensive library function should take care of glyphs > (+ other rules), too. > > I looked at Bero's PUCU and the other links: > http://forum.lazarus.freepascal.org/index.php/topic,33064.msg214342.html#msg214342 > but it went over my head. I must study the issue more later. > > * A reality check! * > Despite problems and incompleteness of our Unicode support, it is > actually better than most other solutions out there. > Ok, most programming tools support Unicode somehow but people use them wrong. > A good example is our forum SMF software. It deals with text layout > and definitely should handle Unicode but it does not. > Not even single Codepoints beyond BMP which should be the most easy > case! No combining rules needed or anything. > Try to add this text to a forum post: (I hope the mail SW can deal with it...) > "Have 🍷 for FPC 💓 Lazarus." > > Now the fact is that code made with FPC / Lazarus using the LazUnicode > functions and enumerators supports Unicode already much better than > most code out there! > > Juha > I think that there is a degree of confusion about the use of ligatures. Ligatures (at least in English) are typographical elements, not language elements. Not all typefaces support them and the code for a ligature should never appear in the source text. It is the function of the display software to combine adjacent characters and display the appropriate ligature if and only if the font that is used supports them. A proportional typeface may display the character sequence 'fl' by using the appropriate ligature glyph. A monospaced typeface would display the same sequence as two characters, as would any typeface that did not include the ligature glyphs. Ligatures improve the appearance of text but are strictly a display function and shouldn't actually appear in the text itself. This may not be true for other writing systems and other languages but is certainly true for English and perhaps other western European languages as well. -- TRUTH in her dress finds facts too tight. In fiction she moves with ease. Stray Birds by Rabindranath Tagore From m.e.sanliturk at gmail.com Mon Oct 24 19:53:21 2016 From: m.e.sanliturk at gmail.com (Mehmet Erol Sanliturk) Date: Mon, 24 Oct 2016 10:53:21 -0700 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <6be99731f84dd3cd4176185537002d09.squirrel@gator3286.hostgator.com> <5b803e46-0bab-f5d2-e5c2-64f1ac4c90ea@lumino.de> <793c05c4-536f-7bd6-7ac0-c474041fddfa@gmx.de> <83921a7c-a7af-fd11-1198-717c1c8e2f95@lumino.de> <03a2221a-b101-3af2-e994-17babef89bd4@gmx.de> Message-ID: On Mon, Oct 24, 2016 at 9:11 AM, Travis Ayres via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > With over 100 replies, we could have already written a course outline, > introduction, and some notes about events and RAD programming, maybe also > the observer pattern? > > On Oct 24, 2016 3:51 AM, "Jürgen Hestermann via Lazarus" < > lazarus at lists.lazarus-ide.org> wrote: > > Am 2016-10-24 um 12:20 schrieb Michael Schnell via Lazarus: > > On 21.10.2016 11:09, Jürgen Hestermann via Lazarus wrote: > >> What is the use of a program? Entertainment? > > Nowadays in 90% of the usage exactly this. > > Maybe other usage cases are more "important", but still the money is > made with Entertainment. > > There may be a misunderstanding: > I did not ask whether the *purpose* of a program is entertainment > but whether *programming* it has to be entertainment? > The aim of programming should be to get a program running > (as the programmer wants it) not to spend time with > juggling gaudy pictures, icons and videos. > > In the end, it is somehow "entertaining" if a program works > but this requires knowledge about how the programming language works. > Ignoring all facts will never lead to a satisfying programming experience. > > > I have the book : https://www.amazon.com/Lazarus-Complete-Guide-pascal-teaching/dp/9490968021 ( Lazarus The complete Guide ) You can write a course outline about , for example , "Programming Pascal by using Lazarus" from thr above book . For Free Pascal , unfortunately , I do not have a teaching oriented book . For general Pascal programming , the following book may be useful : https://www.amazon.com/Structured-Programming-Pascal-Winston-Crawley/dp/0138540357/ref=sr_1_1?s=books&ie=UTF8&qid=1477331132&sr=1-1&keywords=0138540357 ( Structured Programming Using Pascal ) For event based programming , the following pages and links in them may be useful : ( Please see my messages from starting the following link : http://lists.lazarus-ide.org/pipermail/lazarus/2016-October/229807.html ) in page http://lists.lazarus-ide.org/pipermail/lazarus/2016-October/author.html especially : http://lists.lazarus-ide.org/pipermail/lazarus/2016-October/229976.html My opinion is that event based programming needs special care . A simulation example may be useful , for example , by using PetriSim sources , adapted to Free Pascal . Thank you very much . -------------- next part -------------- An HTML attachment was scrubbed... URL: From trayres at gmail.com Mon Oct 24 20:49:30 2016 From: trayres at gmail.com (Travis Ayres) Date: Mon, 24 Oct 2016 11:49:30 -0700 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <03a2221a-b101-3af2-e994-17babef89bd4@gmx.de> References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <6be99731f84dd3cd4176185537002d09.squirrel@gator3286.hostgator.com> <5b803e46-0bab-f5d2-e5c2-64f1ac4c90ea@lumino.de> <793c05c4-536f-7bd6-7ac0-c474041fddfa@gmx.de> <83921a7c-a7af-fd11-1198-717c1c8e2f95@lumino.de> <03a2221a-b101-3af2-e994-17babef89bd4@gmx.de> Message-ID: The part I'm most interested in is using Lazarus to full effect with good architecture; I don't think the GUI portion would make a good first (or even second) course in computers/computing. I would like to see a "Software Architecture" course that used Delphi/FreePascal/Lazarus On Mon, Oct 24, 2016 at 3:51 AM, Jürgen Hestermann via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > Am 2016-10-24 um 12:20 schrieb Michael Schnell via Lazarus: > > On 21.10.2016 11:09, Jürgen Hestermann via Lazarus wrote: > >> What is the use of a program? Entertainment? > > Nowadays in 90% of the usage exactly this. > > Maybe other usage cases are more "important", but still the money is > made with Entertainment. > > There may be a misunderstanding: > I did not ask whether the *purpose* of a program is entertainment > but whether *programming* it has to be entertainment? > The aim of programming should be to get a program running > (as the programmer wants it) not to spend time with > juggling gaudy pictures, icons and videos. > > In the end, it is somehow "entertaining" if a program works > but this requires knowledge about how the programming language works. > Ignoring all facts will never lead to a satisfying programming experience. > > > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wkitty42 at windstream.net Mon Oct 24 22:00:54 2016 From: wkitty42 at windstream.net (wkitty42 at windstream.net) Date: Mon, 24 Oct 2016 16:00:54 -0400 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <6be99731f84dd3cd4176185537002d09.squirrel@gator3286.hostgator.com> <5b803e46-0bab-f5d2-e5c2-64f1ac4c90ea@lumino.de> <793c05c4-536f-7bd6-7ac0-c474041fddfa@gmx.de> <83921a7c-a7af-fd11-1198-717c1c8e2f95@lumino.de> <03a2221a-b101-3af2-e994-17babef89bd4@gmx.de> Message-ID: <295d4484-c261-b249-4ce7-c749d928ddc3@windstream.net> On 10/24/2016 01:53 PM, Mehmet Erol Sanliturk via Lazarus wrote: > I have the book : > > https://www.amazon.com/Lazarus-Complete-Guide-pascal-teaching/dp/9490968021 > ( Lazarus The complete Guide ) i've been looking for that book off and on since i heard about it... amazon currently shows it as unavailable and does not show a price for it :( :( :( -- NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list* unless private contact is specifically requested and granted. From m.e.sanliturk at gmail.com Mon Oct 24 22:29:47 2016 From: m.e.sanliturk at gmail.com (Mehmet Erol Sanliturk) Date: Mon, 24 Oct 2016 13:29:47 -0700 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <295d4484-c261-b249-4ce7-c749d928ddc3@windstream.net> References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <6be99731f84dd3cd4176185537002d09.squirrel@gator3286.hostgator.com> <5b803e46-0bab-f5d2-e5c2-64f1ac4c90ea@lumino.de> <793c05c4-536f-7bd6-7ac0-c474041fddfa@gmx.de> <83921a7c-a7af-fd11-1198-717c1c8e2f95@lumino.de> <03a2221a-b101-3af2-e994-17babef89bd4@gmx.de> <295d4484-c261-b249-4ce7-c749d928ddc3@windstream.net> Message-ID: On Mon, Oct 24, 2016 at 1:00 PM, wkitty42--- via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > On 10/24/2016 01:53 PM, Mehmet Erol Sanliturk via Lazarus wrote: > >> I have the book : >> >> https://www.amazon.com/Lazarus-Complete-Guide-pascal-teachin >> g/dp/9490968021 >> ( Lazarus The complete Guide ) >> > > i've been looking for that book off and on since i heard about it... > amazon currently shows it as unavailable and does not show a price for it > :( :( :( > > -- > NOTE: No off-list assistance is given without prior approval. > *Please keep mailing list traffic on the list* unless > private contact is specifically requested and granted. > -- > _______________________________________________ > > > I am sorry that I have forgot to write the following sentence : "Please search the phrase Lazarus The complete Guide in Google ." I have obtained my book through a friend in Turkey who ordered it from publisher of the above book or a book seller in Europe , I do not know which one , but for a possible link , please see : http://www.pascalgamedevelopment.com/content.php?229-Lazarus-The-Complete-Guide-is-Finally-Here http://www.blaisepascal.eu/index.php?actie=./subscribers/subscription_mainpageUKPaypalPage2 http://www.blaisepascal.eu/subscribers/UK/UK_Book_Department.html http://www.cul.de/lazarus2.html I do not know the availability of the book at present , but , a name is good to start . Sometimes , I am ordering a used book when a new one is not available . In University libraries , it is very likely that the above book may be found . Mehmet Erol Sanliturk -------------- next part -------------- An HTML attachment was scrubbed... URL: From mailinglists at geldenhuys.co.uk Tue Oct 25 00:25:39 2016 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Mon, 24 Oct 2016 23:25:39 +0100 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <6be99731f84dd3cd4176185537002d09.squirrel@gator3286.hostgator.com> <5b803e46-0bab-f5d2-e5c2-64f1ac4c90ea@lumino.de> <793c05c4-536f-7bd6-7ac0-c474041fddfa@gmx.de> <83921a7c-a7af-fd11-1198-717c1c8e2f95@lumino.de> <03a2221a-b101-3af2-e994-17babef89bd4@gmx.de> <295d4484-c261-b249-4ce7-c749d928ddc3@windstream.net> Message-ID: On 2016-10-24 21:29, Mehmet Erol Sanliturk via Lazarus wrote: > http://www.blaisepascal.eu/subscribers/UK/UK_Book_Department.html I believe Blaise Pascal is now the official publisher of that book. From what I can see, they now offer a PDF version of that book, so “out of print” should be of no concern any more. :) 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 m.e.sanliturk at gmail.com Tue Oct 25 06:20:04 2016 From: m.e.sanliturk at gmail.com (Mehmet Erol Sanliturk) Date: Mon, 24 Oct 2016 21:20:04 -0700 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <6be99731f84dd3cd4176185537002d09.squirrel@gator3286.hostgator.com> <5b803e46-0bab-f5d2-e5c2-64f1ac4c90ea@lumino.de> <793c05c4-536f-7bd6-7ac0-c474041fddfa@gmx.de> <83921a7c-a7af-fd11-1198-717c1c8e2f95@lumino.de> <03a2221a-b101-3af2-e994-17babef89bd4@gmx.de> <295d4484-c261-b249-4ce7-c749d928ddc3@windstream.net> Message-ID: On Mon, Oct 24, 2016 at 3:25 PM, Graeme Geldenhuys via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > On 2016-10-24 21:29, Mehmet Erol Sanliturk via Lazarus wrote: > > http://www.blaisepascal.eu/subscribers/UK/UK_Book_Department.html > > I believe Blaise Pascal is now the official publisher of that book. From > what I can see, they now offer a PDF version of that book, so “out of > print” should be of no concern any more. :) > > > 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 > -- > _______________________________________________ > In my book , the following is written : " Copyright (c) 2011 All rights for the English version reserved by Blaise Pascal Magazine . Email : Office at blaisepascal.eu http://www.blaisepascalmagazine.eu " where http://www.blaisepascalmagazine.eu/ is giving "Server not found" but when searched in Google , it is finding http://www.blaisepascal.eu/ ( My opinion is that supplied code , let's say , license is not very well defined , and management of book content requires a different approach because the book is a very good reference and documentary quality . ) Mehmet Erol Sanliturk -------------- next part -------------- An HTML attachment was scrubbed... URL: From mse00000 at gmail.com Tue Oct 25 08:41:46 2016 From: mse00000 at gmail.com (Martin Schreiber) Date: Tue, 25 Oct 2016 08:41:46 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: Message-ID: <201610250841.47021.mse00000@gmail.com> On Monday 24 October 2016 19:53:21 Mehmet Erol Sanliturk via Lazarus wrote: > > > My opinion is that event based programming needs special care . > A simulation example may be useful , for example , by using PetriSim > sources , adapted to Free Pascal . > The last chapter of "Programmieren macht Spass!" is a lift simulation: http://mseide-msegui.sourceforge.net/pics/aufzug.mpeg Martin From m.e.sanliturk at gmail.com Tue Oct 25 12:23:24 2016 From: m.e.sanliturk at gmail.com (Mehmet Erol Sanliturk) Date: Tue, 25 Oct 2016 03:23:24 -0700 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: <201610250841.47021.mse00000@gmail.com> References: <201610250841.47021.mse00000@gmail.com> Message-ID: On Mon, Oct 24, 2016 at 11:41 PM, Martin Schreiber via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > On Monday 24 October 2016 19:53:21 Mehmet Erol Sanliturk via Lazarus wrote: > > > > > > My opinion is that event based programming needs special care . > > A simulation example may be useful , for example , by using PetriSim > > sources , adapted to Free Pascal . > Please here add the following sentence : Then a Petri Net definition may be represented by Lazarus forms easily . I am not ignoring other works such as fpGUI , mseIDE-mseGUI , but we are talking about mostly Lazarus . > > > The last chapter of "Programmieren macht Spass!" is a lift simulation: > http://mseide-msegui.sourceforge.net/pics/aufzug.mpeg > > Martin > -- > _______________________________________________ > It is difficult to play *.mpeg files in Linux ( there is no default player ) . If you have a converter to format which can be played with default players of Linux ( for example , Dragon Player ) , it would be a very good contribution . Simulation subjects may be selected easily for the Department related subjects where Lazarus is taught . Mehmet Erol Sanliturk -------------- next part -------------- An HTML attachment was scrubbed... URL: From mschnell at lumino.de Tue Oct 25 12:47:59 2016 From: mschnell at lumino.de (Michael Schnell) Date: Tue, 25 Oct 2016 12:47:59 +0200 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <6be99731f84dd3cd4176185537002d09.squirrel@gator3286.hostgator.com> <5b803e46-0bab-f5d2-e5c2-64f1ac4c90ea@lumino.de> <793c05c4-536f-7bd6-7ac0-c474041fddfa@gmx.de> <83921a7c-a7af-fd11-1198-717c1c8e2f95@lumino.de> <03a2221a-b101-3af2-e994-17babef89bd4@gmx.de> Message-ID: On 24.10.2016 18:11, Travis Ayres via Lazarus wrote: > > With over 100 replies, we could have already written a course outline, > introduction, ... > It seems we have lost (or silenced) the OP long since :-( -Michael From lacak at zoznam.sk Tue Oct 25 13:21:01 2016 From: lacak at zoznam.sk (LacaK) Date: Tue, 25 Oct 2016 13:21:01 +0200 Subject: [Lazarus] TThread.Synchronize Message-ID: Hi *, I have form on which is button. When user clicks button OnClick event handler is called (it is method of form). Processing of this method takes some time say 1 minute. In the background is operating another thread which every 10 seconds calls Synchronize(@MyForm.MyMethod). My understanding is that, Synchronize schedules execution of MyForm.MyMethod to main thread, so method is not executed until control is returned from event handler in MyForm. Right? But in my case happens, that method is executed while execution of event handler does not finished yet ... is it expected behavior ? If not is there any workaroud which enables me to hold thread until event handler finishes ? Thanks -Laco. From lazarus at kluug.net Tue Oct 25 13:28:21 2016 From: lazarus at kluug.net (Ondrej Pokorny) Date: Tue, 25 Oct 2016 13:28:21 +0200 Subject: [Lazarus] TThread.Synchronize In-Reply-To: References: Message-ID: On 25.10.2016 13:21, LacaK via Lazarus wrote: > I have form on which is button. When user clicks button OnClick event > handler is called (it is method of form). Processing of this method > takes some time say 1 minute. > In the background is operating another thread which every 10 seconds > calls Synchronize(@MyForm.MyMethod). > > My understanding is that, Synchronize schedules execution of > MyForm.MyMethod to main thread, so method is not executed until > control is returned from event handler in MyForm. Right? If you don't call CheckSynchronize within MyForm.MyMethod then yes. > But in my case happens, that method is executed while execution of > event handler does not finished yet ... is it expected behavior ? > If not is there any workaroud which enables me to hold thread until > event handler finishes ? Check for Application.ProcessMessages and CheckSynchronize calls. These process synchronize queue, if I am not mistaken. Ondrej From mschnell at lumino.de Tue Oct 25 13:34:17 2016 From: mschnell at lumino.de (Michael Schnell) Date: Tue, 25 Oct 2016 13:34:17 +0200 Subject: [Lazarus] TThread.Synchronize In-Reply-To: References: Message-ID: <85611d18-b4da-8a65-c875-bccdcc5d1025@lumino.de> On 25.10.2016 13:21, LacaK via Lazarus wrote: > My understanding is that, Synchronize schedules execution of > MyForm.MyMethod to main thread, so method is not executed until > control is returned from event handler in MyForm. Right? TThread.Synchronze pushes the procedure that is given as a parameter (including it's Self pointer) to the event queue and then the Therad that called TThread.Synchronize is stalled. Some time later the main (GUI) thread will execute the scheduled procedure. When this call returns, the thread that called TThread.Synchronize is activated. There also is TThread.Queue that works identically, only without stalling the thread. > But in my case happens, that method is executed while execution of > event handler does not finished yet ... is it expected behavior ? What is "that method"? If same is called by the thread after TThread.Synchronize, IMHO this can't be correct. -Michael From mschnell at lumino.de Tue Oct 25 13:37:03 2016 From: mschnell at lumino.de (Michael Schnell) Date: Tue, 25 Oct 2016 13:37:03 +0200 Subject: [Lazarus] TThread.Synchronize In-Reply-To: References: Message-ID: <362eee4c-2fc2-d194-3735-4b8ed12111bc@lumino.de> > If you don't call CheckSynchronize within MyForm.MyMethod then yes. IMHO the (hardly documented) CheckSynchronize should not be called directly by an application that uses a Widget Type that features an Event Queue. Here the user should do "Application.ProcessMessages", that is decently documented. -Michael From lacak at zoznam.sk Tue Oct 25 14:07:25 2016 From: lacak at zoznam.sk (LacaK) Date: Tue, 25 Oct 2016 14:07:25 +0200 Subject: [Lazarus] TThread.Synchronize In-Reply-To: <85611d18-b4da-8a65-c875-bccdcc5d1025@lumino.de> References: <85611d18-b4da-8a65-c875-bccdcc5d1025@lumino.de> Message-ID: <3033bf13-9fd5-4851-ae11-a31d69582e8f@zoznam.sk> > >> My understanding is that, Synchronize schedules execution of >> MyForm.MyMethod to main thread, so method is not executed until >> control is returned from event handler in MyForm. Right? > TThread.Synchronze pushes the procedure that is given as a parameter > (including it's Self pointer) to the event queue and then the Therad > that called TThread.Synchronize is stalled. ok > Some time later the main (GUI) thread will execute the scheduled > procedure. When this call returns, the thread that called > TThread.Synchronize is activated. ok but what is relation between "main thread" and this "sheduled procedure" ? Can "sheduled procedure" jump into execution while main thread is still executing prior called form method ? > > There also is TThread.Queue that works identically, only without > stalling the thread. yes, but I do not want this > >> But in my case happens, that method is executed while execution of >> event handler does not finished yet ... is it expected behavior ? > > What is "that method"? If same is called by the thread after > TThread.Synchronize, IMHO this can't be correct. Yes this can happen. MyForm.MyMethod is called also from event handler and also is used in Synchronize(@MyForm.MyMethod) How can this happen/play role? I have suspection that somewhere in Win32 widgetset is called CheckSynchronize as reaction on some message or so, which releases execution of MyForm.MyMethod ... but it is inappropriate, does not ? -Laco. From lacak at zoznam.sk Tue Oct 25 14:12:27 2016 From: lacak at zoznam.sk (LacaK) Date: Tue, 25 Oct 2016 14:12:27 +0200 Subject: [Lazarus] TThread.Synchronize In-Reply-To: References: Message-ID: <219b8a1f-9406-9760-fe25-c3ee42c43f43@zoznam.sk> > Check for Application.ProcessMessages and CheckSynchronize calls. > These process synchronize queue, if I am not mistaken. I do not call CheckSynchronize nor ProcessMessages in my application. So only any LCL component or widget set can call it in background ? -Laco. From lacak at zoznam.sk Tue Oct 25 14:46:52 2016 From: lacak at zoznam.sk (LacaK) Date: Tue, 25 Oct 2016 14:46:52 +0200 Subject: [Lazarus] TThread.Synchronize In-Reply-To: <219b8a1f-9406-9760-fe25-c3ee42c43f43@zoznam.sk> References: <219b8a1f-9406-9760-fe25-c3ee42c43f43@zoznam.sk> Message-ID: <33a2212a-e85c-ae52-8a54-cab6f003e834@zoznam.sk> > >> Check for Application.ProcessMessages and CheckSynchronize calls. >> These process synchronize queue, if I am not mistaken. > > I do not call CheckSynchronize nor ProcessMessages in my application. > So only any LCL component or widget set can call it in background ? > From Delphi doc: "Synchronize causes the call specified by AMethod to be executed using the main thread, thereby avoiding multithread conflicts. If you are unsure whether a method call is thread-safe, call it from within the Synchronize method to ensure that it executes in the main thread. Execution of the current thread is suspended while the method executes in the main thread. " Looking from where is called CheckSynchronize: - TWin32WidgetSet.AppProcessMessages - win32callback.inc: case Msg of WM_NULL: if (Window = Win32WidgetSet.AppHandle) then begin CheckSynchronize; ... Cann't something send WM_NULL to application which can as reaction run sheduled thread ? WM_NULL sends HandleWakeMainThread() which is handler stored in variable WakeMainThread Messages in win32callback are processed by "main thread" only, so execution cann't happen while form method is executed ? -Laco. > -Laco. > From lazarus at kluug.net Tue Oct 25 14:47:40 2016 From: lazarus at kluug.net (Ondrej Pokorny) Date: Tue, 25 Oct 2016 14:47:40 +0200 Subject: [Lazarus] TThread.Synchronize In-Reply-To: <219b8a1f-9406-9760-fe25-c3ee42c43f43@zoznam.sk> References: <219b8a1f-9406-9760-fe25-c3ee42c43f43@zoznam.sk> Message-ID: On 25.10.2016 14:12, LacaK via Lazarus wrote: > I do not call CheckSynchronize nor ProcessMessages in my application. > So only any LCL component or widget set can call it in background ? It should be easy for you to set a breakpoint into MyForm.MyMethod and check the call stack. Ondrej From michael at freepascal.org Tue Oct 25 15:03:11 2016 From: michael at freepascal.org (Michael Van Canneyt) Date: Tue, 25 Oct 2016 15:03:11 +0200 (CEST) Subject: [Lazarus] TThread.Synchronize In-Reply-To: <219b8a1f-9406-9760-fe25-c3ee42c43f43@zoznam.sk> References: <219b8a1f-9406-9760-fe25-c3ee42c43f43@zoznam.sk> Message-ID: On Tue, 25 Oct 2016, LacaK via Lazarus wrote: > >> Check for Application.ProcessMessages and CheckSynchronize calls. >> These process synchronize queue, if I am not mistaken. > > I do not call CheckSynchronize nor ProcessMessages in my application. > So only any LCL component or widget set can call it in background ? ShowModal() for a modal form will call it. Michael. From lacak at zoznam.sk Tue Oct 25 15:02:06 2016 From: lacak at zoznam.sk (LacaK) Date: Tue, 25 Oct 2016 15:02:06 +0200 Subject: [Lazarus] TThread.Synchronize In-Reply-To: References: <219b8a1f-9406-9760-fe25-c3ee42c43f43@zoznam.sk> Message-ID: <690e88df-83a5-cb71-a11a-7c5902695af9@zoznam.sk> >> I do not call CheckSynchronize nor ProcessMessages in my application. >> So only any LCL component or widget set can call it in background ? > > It should be easy for you to set a breakpoint into MyForm.MyMethod and > check the call stack. > But error (AV) happens only in production and only sometimes. Is there any way how to write call stack into file ? TIA -Laco. From nc-gaertnma at netcologne.de Tue Oct 25 15:50:54 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Tue, 25 Oct 2016 15:50:54 +0200 Subject: [Lazarus] TThread.Synchronize In-Reply-To: <362eee4c-2fc2-d194-3735-4b8ed12111bc@lumino.de> References: <362eee4c-2fc2-d194-3735-4b8ed12111bc@lumino.de> Message-ID: <20161025155054.258716fe@limapholos.matflo.wg> On Tue, 25 Oct 2016 13:37:03 +0200 Michael Schnell via Lazarus wrote: > > If you don't call CheckSynchronize within MyForm.MyMethod then yes. > IMHO the (hardly documented) CheckSynchronize should not be called > directly by an application that uses a Widget Type that features an > Event Queue. Here the user should do "Application.ProcessMessages", that > is decently documented. CheckSynchronize checks the FPC thread queue. Application.ProcessMessages calls CheckSynchronize and checks the LCL event queues. It is not forbidden to call CheckSynchronize in a LCL application. Mattias From nc-gaertnma at netcologne.de Tue Oct 25 15:54:49 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Tue, 25 Oct 2016 15:54:49 +0200 Subject: [Lazarus] TThread.Synchronize In-Reply-To: <690e88df-83a5-cb71-a11a-7c5902695af9@zoznam.sk> References: <219b8a1f-9406-9760-fe25-c3ee42c43f43@zoznam.sk> <690e88df-83a5-cb71-a11a-7c5902695af9@zoznam.sk> Message-ID: <20161025155449.6404165d@limapholos.matflo.wg> On Tue, 25 Oct 2016 15:02:06 +0200 LacaK via Lazarus wrote: > >> I do not call CheckSynchronize nor ProcessMessages in my application. > >> So only any LCL component or widget set can call it in background ? > > > > It should be easy for you to set a breakpoint into MyForm.MyMethod and > > check the call stack. > > > But error (AV) happens only in production and only sometimes. > Is there any way how to write call stack into file ? You can try GetStackTrace(true) and save it string to a file. It must be called from main thread. Mattias From trayres at gmail.com Tue Oct 25 18:23:53 2016 From: trayres at gmail.com (Travis Ayres) Date: Tue, 25 Oct 2016 09:23:53 -0700 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <6be99731f84dd3cd4176185537002d09.squirrel@gator3286.hostgator.com> <5b803e46-0bab-f5d2-e5c2-64f1ac4c90ea@lumino.de> <793c05c4-536f-7bd6-7ac0-c474041fddfa@gmx.de> <83921a7c-a7af-fd11-1198-717c1c8e2f95@lumino.de> <03a2221a-b101-3af2-e994-17babef89bd4@gmx.de> Message-ID: So...who wants to work on a modern course outline with me? We have a lot of opinions and people willing to chime in, maybe we can do something good for the community? On Oct 25, 2016 4:03 AM, "Michael Schnell via Lazarus" < lazarus at lists.lazarus-ide.org> wrote: > > > On 24.10.2016 18:11, Travis Ayres via Lazarus wrote: > >> >> With over 100 replies, we could have already written a course outline, >> introduction, ... >> >> It seems we have lost (or silenced) the OP long since :-( > > -Michael > > > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vfclists at gmail.com Tue Oct 25 20:43:09 2016 From: vfclists at gmail.com (vfclists .) Date: Tue, 25 Oct 2016 19:43:09 +0100 Subject: [Lazarus] TPageControl OnChange calling issue In-Reply-To: References: Message-ID: On 10 October 2016 at 10:12, Bart via Lazarus wrote: > On 10/3/16, Michael W. Vogel via Lazarus > wrote: > > we want to discuss a bug report > > http://bugs.freepascal.org/view.php?id=25554 here, not in Mantis (hope, > > I understand Bart right). > > I have remove the call to DoChange in r53089 and documented the > changes in http://wiki.lazarus.freepascal.org/Lazarus_1.8.0_release_notes# > TCustomTabControl_setting_TabIndex_or_PageIndex_by_code > > @Michl: feel free to open a seperate bugreport for the feature request > to make this behaviour configurable. > (Although I think you do not need it anymore?) > > Bart > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus > I think this is not logical. If the OnChange event is supposed to fire when the tab changes, and a PageIndex or a TabIndex changes the tab then it should do as it says. If the programmer wants Delphi compatibility then it is for the programmer to set a flag so that the OnChange event only fires when the end user changes the tab. In that case there should be a new event such as OnUserChange or something similar. These illogical compatibility related definitions cause no end of trouble.If ill thought out definitions went into Delphi it is not smart to conform to them. Better make it known that they are illogical and that Lazarus and Freepascal do it the right way and gives them the option of switching to Delphi behaviour. -- Frank Church ======================= http://devblog.brahmancreations.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From doug at moosemail.net Tue Oct 25 21:38:40 2016 From: doug at moosemail.net (DougC) Date: Tue, 25 Oct 2016 15:38:40 -0400 Subject: [Lazarus] TPageControl OnChange calling issue In-Reply-To: References: Message-ID: <157fd5a10e5.12a5689bf170926.1619490176976085801@moosemail.net> Delphi's developers faced exactly the same dilemma with respect to Windows' behavior. Some of the standard behavior triggering events did not make much sense and they had to decide to keep it as it was or define an improvement. For the most part they kept it as it was. These are not easy decisions. One logical approach does not always work in all cases. However, good documentation alone goes a long, long way to improving the situation. ---- On Tue, 25 Oct 2016 14:43:09 -0400vfclists . via Lazarus <lazarus at lists.lazarus-ide.org> wrote ---- On 10 October 2016 at 10:12, Bart via Lazarus <lazarus at lists.lazarus-ide.org> wrote: I think this is not logical. If the OnChange event is supposed to fire when the tab changes, and a PageIndex or a TabIndex changes the tab then it should do as it says. If the programmer wants Delphi compatibility then it is for the programmer to set a flag so that the OnChange event only fires when the end user changes the tab. In that case there should be a new event such as OnUserChange or something similar. These illogical compatibility related definitions cause no end of trouble.If ill thought out definitions went into Delphi it is not smart to conform to them. Better make it known that they are illogical and that Lazarus and Freepascal do it the right way and gives them the option of switching to Delphi behaviour. -- Frank Church -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.e.sanliturk at gmail.com Wed Oct 26 03:10:01 2016 From: m.e.sanliturk at gmail.com (Mehmet Erol Sanliturk) Date: Tue, 25 Oct 2016 18:10:01 -0700 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <6be99731f84dd3cd4176185537002d09.squirrel@gator3286.hostgator.com> <5b803e46-0bab-f5d2-e5c2-64f1ac4c90ea@lumino.de> <793c05c4-536f-7bd6-7ac0-c474041fddfa@gmx.de> <83921a7c-a7af-fd11-1198-717c1c8e2f95@lumino.de> <03a2221a-b101-3af2-e994-17babef89bd4@gmx.de> Message-ID: On Tue, Oct 25, 2016 at 9:23 AM, Travis Ayres via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > So...who wants to work on a modern course outline with me? We have a lot > of opinions and people willing to chime in, maybe we can do something good > for the community? > > On Oct 25, 2016 4:03 AM, "Michael Schnell via Lazarus" < > lazarus at lists.lazarus-ide.org> wrote: > >> >> >> On 24.10.2016 18:11, Travis Ayres via Lazarus wrote: >> >>> >>> With over 100 replies, we could have already written a course outline, >>> introduction, ... >>> >>> It seems we have lost (or silenced) the OP long since :-( >> >> -Michael >> >> My opinion is that writing a course outline is not an abstract process . It will be delivered in a Department : Goals of Department with its web site Class of Students as Year ( First . ... , Fourth ) Curriculum of Department : Where the course(s) will be embedded Goals of the Course(s) : What is the purpose of course : What will gain the students from the course ? Upward services to other courses : Names of such courses Prerequisite Courses : If any Background courses : Previous courses which can be used as supporting the course Text books selected for course(s) ; How many course(s) with weekly number of class hours are selected Course class schedule ( Two courses , etc. ) will determine load level of classes Possible Goals will serve to determine course Names and contents ( examples , problems , etc. ) . "Pascal" itself may require an independent course "Lazarus" itself may require an independent course "Event driven" programming ( with Petri Nets ) itself may require an independent course "Pascal" may be an independent course as a "First" computer programming course or a "Second" . There may be a previously taken "Computer Programming Algorithms" ( as Introduction ) course or students may need such a course independent from a programming language . All of these affect a course sequence contents . This means that to be able to design a course outline which will serve to your needs , it is necessary to supply the above information ( at least ) without forgetting the instructor factor . Thank you very much . Mehmet Erol Sanliturk -------------- next part -------------- An HTML attachment was scrubbed... URL: From lacak at zoznam.sk Wed Oct 26 07:57:18 2016 From: lacak at zoznam.sk (LacaK) Date: Wed, 26 Oct 2016 07:57:18 +0200 Subject: [Lazarus] TThread.Synchronize In-Reply-To: References: <219b8a1f-9406-9760-fe25-c3ee42c43f43@zoznam.sk> Message-ID: <53879b62-bba8-55b8-1abf-3e007cbf7c20@zoznam.sk> > >> >>> Check for Application.ProcessMessages and CheckSynchronize calls. >>> These process synchronize queue, if I am not mistaken. >> >> I do not call CheckSynchronize nor ProcessMessages in my application. >> So only any LCL component or widget set can call it in background ? > > ShowModal() for a modal form will call it. Ah really? It happens in my application! Basicaly I have one form MyForm with one background thread, which every 10 sec. checks for files in shared folder and adds them to listbox visible to user: procedure TRefreshFileListThread.Execute; begin while not Terminated do begin Synchronize(@MyForm.UpdateFileList); // UpdateFileList is method which clears listbox and then adds files in given shared folder Sleep(10000); end; When new file is shown then user can click on button, which imports data from this file: Before import is shown another form with question about "Do you want really import file XYZ ?" Do you say, that when this "question form" is shown it can release call to MyForm.UpdateFileList ? Now I did quick test and it seems, that it is so! But is it correct behavior ? IMO it is against thread safety, which should Synchronize guarantee! While "main thread" is executing others threads should wait in queue ... if not fixable, then can it be documented?, because this is exception which is not intuitive -Laco. From michael at freepascal.org Wed Oct 26 08:31:25 2016 From: michael at freepascal.org (Michael Van Canneyt) Date: Wed, 26 Oct 2016 08:31:25 +0200 (CEST) Subject: [Lazarus] TThread.Synchronize In-Reply-To: <53879b62-bba8-55b8-1abf-3e007cbf7c20@zoznam.sk> References: <219b8a1f-9406-9760-fe25-c3ee42c43f43@zoznam.sk> <53879b62-bba8-55b8-1abf-3e007cbf7c20@zoznam.sk> Message-ID: On Wed, 26 Oct 2016, LacaK via Lazarus wrote: > >> >>> >>>> Check for Application.ProcessMessages and CheckSynchronize calls. >>>> These process synchronize queue, if I am not mistaken. >>> >>> I do not call CheckSynchronize nor ProcessMessages in my application. >>> So only any LCL component or widget set can call it in background ? >> >> ShowModal() for a modal form will call it. > > Ah really? > It happens in my application! Then that is your problem. > But is it correct behavior ? IMO it is against thread safety, which > should Synchronize guarantee! The two issues are completely unrelated. The current behaviour is correct. Nowhere is it stated or guaranteed that synchronisation cannot happen in a GUI event handler. Any code at any time can call the GUI message loop. A modal form is just one instance. Your code must be able to deal with this. Michael. From lacak at zoznam.sk Wed Oct 26 09:49:44 2016 From: lacak at zoznam.sk (LacaK) Date: Wed, 26 Oct 2016 09:49:44 +0200 Subject: [Lazarus] TThread.Synchronize In-Reply-To: References: <219b8a1f-9406-9760-fe25-c3ee42c43f43@zoznam.sk> <53879b62-bba8-55b8-1abf-3e007cbf7c20@zoznam.sk> Message-ID: <251739db-ec9b-e487-7ca7-01d94e1e254d@zoznam.sk> >>> ShowModal() for a modal form will call it. >> >> Ah really? >> It happens in my application! > > Then that is your problem. :-))) > >> But is it correct behavior ? IMO it is against thread safety, which >> should Synchronize guarantee! > > The two issues are completely unrelated. The current behaviour is > correct. I did test in Delphi and Delphi seems also perform synchronize upon ShowModal > > Nowhere is it stated or guaranteed that synchronisation cannot happen > in a GUI event > handler. But cann't happen if nobody calls ProcessMessages or CheckSynchronize explicitly. So if user code is executed in event handler then this execution cann't be interrupted by thread waiting for "synchronization" > Any code at any time can call the GUI message loop. A modal form is > just one instance. ModalForm is IMO one example but may be alone in LCL ... as there are no more controls which do same, does not ? So in my mind it is very specific case, which should be documented. Of course there can be any user defined control which will do same ... > Your code must be able to deal with this. > Yes, thanks -Laco. From nc-gaertnma at netcologne.de Wed Oct 26 10:13:29 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Wed, 26 Oct 2016 10:13:29 +0200 Subject: [Lazarus] TThread.Synchronize In-Reply-To: <251739db-ec9b-e487-7ca7-01d94e1e254d@zoznam.sk> References: <219b8a1f-9406-9760-fe25-c3ee42c43f43@zoznam.sk> <53879b62-bba8-55b8-1abf-3e007cbf7c20@zoznam.sk> <251739db-ec9b-e487-7ca7-01d94e1e254d@zoznam.sk> Message-ID: <20161026101329.3d0b7eea@limapholos.matflo.wg> On Wed, 26 Oct 2016 09:49:44 +0200 LacaK via Lazarus wrote: > >>> ShowModal() for a modal form will call it. >[...] > I did test in Delphi and Delphi seems also perform synchronize upon > ShowModal Yes. > > Nowhere is it stated or guaranteed that synchronisation cannot happen > > in a GUI event > > handler. > > But cann't happen if nobody calls ProcessMessages or CheckSynchronize > explicitly. > So if user code is executed in event handler then this execution cann't > be interrupted by thread waiting for "synchronization" Yes. Unless you call something that does call HandleMessages/ProcessMessages or CheckSynchronize. > > Any code at any time can call the GUI message loop. A modal form is > > just one instance. > > ModalForm is IMO one example but may be alone in LCL ... as there are no > more controls which do same, does not ? The dialogs like TOpenDialog and ShowMessage call it. Another example is reading the Clipboard on gtk and retrieving files in TShellTreeView. Mattias From lacak at zoznam.sk Wed Oct 26 10:27:45 2016 From: lacak at zoznam.sk (LacaK) Date: Wed, 26 Oct 2016 10:27:45 +0200 Subject: [Lazarus] TThread.Synchronize In-Reply-To: <20161026101329.3d0b7eea@limapholos.matflo.wg> References: <219b8a1f-9406-9760-fe25-c3ee42c43f43@zoznam.sk> <53879b62-bba8-55b8-1abf-3e007cbf7c20@zoznam.sk> <251739db-ec9b-e487-7ca7-01d94e1e254d@zoznam.sk> <20161026101329.3d0b7eea@limapholos.matflo.wg> Message-ID: <604f0842-1c2c-ab7c-4509-f6280b374bff@zoznam.sk> Big Thanks to all. Now I understand what is happening ... probably I wil use critical section to block access from thread when code in main thread is performed ... -Laco. > >>>>> ShowModal() for a modal form will call it. >> [...] >> I did test in Delphi and Delphi seems also perform synchronize upon >> ShowModal > Yes. > > >>> Nowhere is it stated or guaranteed that synchronisation cannot happen >>> in a GUI event >>> handler. >> But cann't happen if nobody calls ProcessMessages or CheckSynchronize >> explicitly. >> So if user code is executed in event handler then this execution cann't >> be interrupted by thread waiting for "synchronization" > Yes. > Unless you call something that does call HandleMessages/ProcessMessages > or CheckSynchronize. > > >>> Any code at any time can call the GUI message loop. A modal form is >>> just one instance. >> ModalForm is IMO one example but may be alone in LCL ... as there are no >> more controls which do same, does not ? > The dialogs like TOpenDialog and ShowMessage call it. > Another example is reading the Clipboard on gtk and retrieving files in > TShellTreeView. > > > Mattias From mschnell at lumino.de Wed Oct 26 11:17:18 2016 From: mschnell at lumino.de (Michael Schnell) Date: Wed, 26 Oct 2016 11:17:18 +0200 Subject: [Lazarus] TThread.Synchronize In-Reply-To: <53879b62-bba8-55b8-1abf-3e007cbf7c20@zoznam.sk> References: <219b8a1f-9406-9760-fe25-c3ee42c43f43@zoznam.sk> <53879b62-bba8-55b8-1abf-3e007cbf7c20@zoznam.sk> Message-ID: <58029871-eb2c-03bc-fc15-eb6f48f56a1a@lumino.de> On 26.10.2016 07:57, LacaK via Lazarus wrote: > procedure TRefreshFileListThread.Execute; > begin > while not Terminated do begin > Synchronize(@MyForm.UpdateFileList); // UpdateFileList is method > which clears listbox and then adds files in given shared folder > Sleep(10000); > end; This only makes sense if the actual file list generation (all but the GUI update) is done in not shown code in the thread before Synchonize is called. Otherwise you just could use TTimer. Is this done that way? -Michael From lacak at zoznam.sk Wed Oct 26 12:02:13 2016 From: lacak at zoznam.sk (LacaK) Date: Wed, 26 Oct 2016 12:02:13 +0200 Subject: [Lazarus] TThread.Synchronize In-Reply-To: <58029871-eb2c-03bc-fc15-eb6f48f56a1a@lumino.de> References: <219b8a1f-9406-9760-fe25-c3ee42c43f43@zoznam.sk> <53879b62-bba8-55b8-1abf-3e007cbf7c20@zoznam.sk> <58029871-eb2c-03bc-fc15-eb6f48f56a1a@lumino.de> Message-ID: Dňa 26.10.2016 o 11:17 Michael Schnell via Lazarus napísal(a): > On 26.10.2016 07:57, LacaK via Lazarus wrote: >> procedure TRefreshFileListThread.Execute; >> begin >> while not Terminated do begin >> Synchronize(@MyForm.UpdateFileList); // UpdateFileList is method >> which clears listbox and then adds files in given shared folder >> Sleep(10000); >> end; > This only makes sense if the actual file list generation (all but the > GUI update) is done in not shown code in the thread before Synchonize > is called. no. thread code is all what you see above. my intention was use thread only for periodical refresh of list > > Otherwise you just could use TTimer. probably yes. I do not remember why I have used thread for it. May be I do not wanted dependency on ExtCtrls ... Btw. when TTimer is executing OnTimer method, which does not finishes until next Interval is elapsed, is again called OnTimer ? Or next OnTimer is performed only when prior OnTimer finished ? -Laco. From mschnell at lumino.de Wed Oct 26 13:09:23 2016 From: mschnell at lumino.de (Michael Schnell) Date: Wed, 26 Oct 2016 13:09:23 +0200 Subject: [Lazarus] TThread.Synchronize In-Reply-To: References: <219b8a1f-9406-9760-fe25-c3ee42c43f43@zoznam.sk> <53879b62-bba8-55b8-1abf-3e007cbf7c20@zoznam.sk> <58029871-eb2c-03bc-fc15-eb6f48f56a1a@lumino.de> Message-ID: <6dcd9812-ec13-619c-c4f0-301c773d9a56@lumino.de> On 26.10.2016 12:02, LacaK via Lazarus wrote: >> >> you just could use TTimer. > probably yes. I do not remember why I have used thread for it. May be > I do not wanted dependency on ExtCtrls ... > Btw. when TTimer is executing OnTimer method, which does not finishes > until next Interval is elapsed, is again called OnTimer ? Or next > OnTimer is performed only when prior OnTimer finished ? > Using a "Worker" Thread makes sense when - long winding stuff (calculations, file search, database, ...) are done in the Thread and the GUI is supposed to go on working during that time - you want to take advantage of multiple cores working in parallel (e.g. for number crunching) - you want to wait for external events in a blocking OS Call (e.g. Socket). I would avoid using Threads if not decently justified, as a lot complexity is added. -Michael From larrydalton71 at gmail.com Wed Oct 26 17:40:45 2016 From: larrydalton71 at gmail.com (Larry Dalton) Date: Wed, 26 Oct 2016 10:40:45 -0500 Subject: [Lazarus] TMouseinput mouse click. Message-ID: I am running Lazarus 1.6 on Windows 7. I have one application where I need to move the mouse to a certain point on the screen and then do a mouseclick from the program. When I run the following procedure, procedure TMain_Form.Button1Click(Sender: TObject); var MousePos:Tpoint; MyMouse:TMouseInput; begin MyMouse:=TMouseInput.Create; MousePos:=Mouse.CursorPos; MousePos.x:=200; MousePos.y:=75; Mouse.CursorPos:=MousePos; MyMouse.Click(mbLeft,[]); MyMouse.Destroy; end; I get the following error code : Abstract Method Called. Click OK to ignore and risk data corruption or Cancel to kill the program. I know the problem is in the MyMouse.Click procedure. How do I make this work? -------------- next part -------------- An HTML attachment was scrubbed... URL: From Sascha.Hestermann at gmx.de Wed Oct 26 20:23:11 2016 From: Sascha.Hestermann at gmx.de (Sascha Hestermann) Date: Wed, 26 Oct 2016 20:23:11 +0200 Subject: [Lazarus] TThread.Synchronize In-Reply-To: References: <219b8a1f-9406-9760-fe25-c3ee42c43f43@zoznam.sk> <53879b62-bba8-55b8-1abf-3e007cbf7c20@zoznam.sk> <58029871-eb2c-03bc-fc15-eb6f48f56a1a@lumino.de> Message-ID: Am 26.10.2016 um 12:02 schrieb LacaK via Lazarus: > Btw. when TTimer is executing OnTimer method, which does not finishes > until next Interval is elapsed, is again called OnTimer ? Or next > OnTimer is performed only when prior OnTimer finished ? Afaik TTimer periodically sends a message to the event queue (at least on Windows) and the OnTimer method is called once this message is processed. So unless you call ProcessMessages within your OnTimer method it won't be called again before it's finished. From info at voiceliveeditor.com Wed Oct 26 20:46:08 2016 From: info at voiceliveeditor.com (info at voiceliveeditor.com) Date: Wed, 26 Oct 2016 19:46:08 +0100 Subject: [Lazarus] osx cocoa panel no caption ? Message-ID: <67FB6670C8884A7385635414EE03EF82@ianPC> Hi I have been struggling with cocoa and the non displaying of text when a font is changed programmatically. However after further testing; I also notice that the Tpanel component does not show the caption of the panel. Just drop a panel on a form, change the font to something bold and large so you can see then compile for cocoa. No Text. I have been getting similar problems when using bgrabitmap on cocoa; no test displayed when the font is changed. So something weird happening Anyone else experience this? -------------- next part -------------- An HTML attachment was scrubbed... URL: From nc-gaertnma at netcologne.de Wed Oct 26 23:45:32 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Wed, 26 Oct 2016 23:45:32 +0200 Subject: [Lazarus] TThread.Synchronize In-Reply-To: References: <219b8a1f-9406-9760-fe25-c3ee42c43f43@zoznam.sk> <53879b62-bba8-55b8-1abf-3e007cbf7c20@zoznam.sk> <58029871-eb2c-03bc-fc15-eb6f48f56a1a@lumino.de> Message-ID: <20161026234532.5841cfa1@limapholos.matflo.wg> On Wed, 26 Oct 2016 20:23:11 +0200 Sascha Hestermann via Lazarus wrote: > Am 26.10.2016 um 12:02 schrieb LacaK via Lazarus: > > Btw. when TTimer is executing OnTimer method, which does not finishes > > until next Interval is elapsed, is again called OnTimer ? Or next > > OnTimer is performed only when prior OnTimer finished ? The next time event is set when the timer event has finished. That's why it is not an exact interval timer. > Afaik TTimer periodically sends a message to the event queue (at least > on Windows) and the OnTimer method is called once this message is > processed. So unless you call ProcessMessages within your OnTimer method > it won't be called again before it's finished. Yes. Mattias From getmem1 at gmail.com Thu Oct 27 14:34:43 2016 From: getmem1 at gmail.com (=?UTF-8?B?QmFsw6F6cyBTesOpa2VseQ==?=) Date: Thu, 27 Oct 2016 15:34:43 +0300 Subject: [Lazarus] TMouseinput mouse click. In-Reply-To: References: Message-ID: Add lazmouseandkeyinput to the required packages, then: uses MouseAndKeyInput; procedure TForm1.Button1Click(Sender: TObject); begin MouseInput.Move([], 200, 75); MouseInput.Click(mbLeft,[], 200, 75); end; On Wed, Oct 26, 2016 at 6:40 PM, Larry Dalton via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > I am running Lazarus 1.6 on Windows 7. I have one application where I need > to move the mouse to a certain point on the screen and then do a mouseclick > from the program. > > When I run the following procedure, > > procedure TMain_Form.Button1Click(Sender: TObject); > var MousePos:Tpoint; > MyMouse:TMouseInput; > begin > MyMouse:=TMouseInput.Create; > MousePos:=Mouse.CursorPos; > MousePos.x:=200; > MousePos.y:=75; > Mouse.CursorPos:=MousePos; > MyMouse.Click(mbLeft,[]); > MyMouse.Destroy; > > end; > > I get the following error code : Abstract Method Called. Click OK to > ignore and risk data corruption or Cancel to kill the program. > > I know the problem is in the MyMouse.Click procedure. How do I make this > work? > > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From larrydalton71 at gmail.com Thu Oct 27 16:35:24 2016 From: larrydalton71 at gmail.com (Larry Dalton) Date: Thu, 27 Oct 2016 09:35:24 -0500 Subject: [Lazarus] TMouseinput mouse click. In-Reply-To: References: Message-ID: <8DAF1587-6773-46E5-9398-8A3405B576CC@gmail.com> Worked great! Thanks! Sent from my iPhone > On Oct 27, 2016, at 07:34, Balázs Székely via Lazarus wrote: > > Add lazmouseandkeyinput to the required packages, then: > > uses MouseAndKeyInput; > > procedure TForm1.Button1Click(Sender: TObject); > begin > MouseInput.Move([], 200, 75); > MouseInput.Click(mbLeft,[], 200, 75); > end; > >> On Wed, Oct 26, 2016 at 6:40 PM, Larry Dalton via Lazarus wrote: >> I am running Lazarus 1.6 on Windows 7. I have one application where I need to move the mouse to a certain point on the screen and then do a mouseclick from the program. >> >> When I run the following procedure, >> >> procedure TMain_Form.Button1Click(Sender: TObject); >> var MousePos:Tpoint; >> MyMouse:TMouseInput; >> begin >> MyMouse:=TMouseInput.Create; >> MousePos:=Mouse.CursorPos; >> MousePos.x:=200; >> MousePos.y:=75; >> Mouse.CursorPos:=MousePos; >> MyMouse.Click(mbLeft,[]); >> MyMouse.Destroy; >> >> end; >> >> I get the following error code : Abstract Method Called. Click OK to ignore and risk data corruption or Cancel to kill the program. >> >> I know the problem is in the MyMouse.Click procedure. How do I make this work? >> >> -- >> _______________________________________________ >> Lazarus mailing list >> Lazarus at lists.lazarus-ide.org >> http://lists.lazarus-ide.org/listinfo/lazarus >> > > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: From list2010 at BrenemanLabs.com Thu Oct 27 18:15:15 2016 From: list2010 at BrenemanLabs.com (Paul Breneman) Date: Thu, 27 Oct 2016 11:15:15 -0500 Subject: [Lazarus] Teaching Pascal at College In-Reply-To: References: <79a0ab2e-fe39-8e8c-5fde-6b15329f5ccb@mccallumwhyman.com> <2d16cec9-a889-297c-2e9c-1c5a73943818@zoznam.sk> <6be99731f84dd3cd4176185537002d09.squirrel@gator3286.hostgator.com> <5b803e46-0bab-f5d2-e5c2-64f1ac4c90ea@lumino.de> <793c05c4-536f-7bd6-7ac0-c474041fddfa@gmx.de> <83921a7c-a7af-fd11-1198-717c1c8e2f95@lumino.de> <03a2221a-b101-3af2-e994-17babef89bd4@gmx.de> Message-ID: On 10/25/2016 11:23 AM, Travis Ayres via Lazarus wrote: > So...who wants to work on a modern course outline with me? We have a lot of > opinions and people willing to chime in, maybe we can do something good for > the community? Some suggestions: 1) As the OP wrote (in a later message) "All my students will be civil, environmental or bio engineers but not computer engineers", I would recommend checking out SoftwareCarpentry.org (see links on home page www.ControlPascal.com ) which has been teaching basic programming to non-programmer engineers since 1998. They've already done a *lot* of work that doesn't need to be repeated! But a pascal version would be nice. 2) I just purchased the least expensive PicoScope which I hope to combine with the Basic Stamp kit (see top of this page): http://www.controlpascal.com/tutorial.htm Instant gratification (blinking LEDs, switches to push) has worked for me and others. One of my favorite college courses (in about 1981) combined programming and electronics, and after that I decided to jump into embedded programming (previously I did electronic work). Regards, Paul From larrydalton71 at gmail.com Fri Oct 28 01:09:35 2016 From: larrydalton71 at gmail.com (Larry Dalton) Date: Thu, 27 Oct 2016 18:09:35 -0500 Subject: [Lazarus] TMouseinput mouse click. In-Reply-To: References: Message-ID: Is there a procedure to print a string at the cursor? Sent from my iPhone > On Oct 27, 2016, at 07:34, Balázs Székely via Lazarus wrote: > > Add lazmouseandkeyinput to the required packages, then: > > uses MouseAndKeyInput; > > procedure TForm1.Button1Click(Sender: TObject); > begin > MouseInput.Move([], 200, 75); > MouseInput.Click(mbLeft,[], 200, 75); > end; > >> On Wed, Oct 26, 2016 at 6:40 PM, Larry Dalton via Lazarus wrote: >> I am running Lazarus 1.6 on Windows 7. I have one application where I need to move the mouse to a certain point on the screen and then do a mouseclick from the program. >> >> When I run the following procedure, >> >> procedure TMain_Form.Button1Click(Sender: TObject); >> var MousePos:Tpoint; >> MyMouse:TMouseInput; >> begin >> MyMouse:=TMouseInput.Create; >> MousePos:=Mouse.CursorPos; >> MousePos.x:=200; >> MousePos.y:=75; >> Mouse.CursorPos:=MousePos; >> MyMouse.Click(mbLeft,[]); >> MyMouse.Destroy; >> >> end; >> >> I get the following error code : Abstract Method Called. Click OK to ignore and risk data corruption or Cancel to kill the program. >> >> I know the problem is in the MyMouse.Click procedure. How do I make this work? >> >> -- >> _______________________________________________ >> Lazarus mailing list >> Lazarus at lists.lazarus-ide.org >> http://lists.lazarus-ide.org/listinfo/lazarus >> > > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: From getmem1 at gmail.com Fri Oct 28 08:20:41 2016 From: getmem1 at gmail.com (=?UTF-8?Q?Bal=C3=A1zs_Sz=C3=A9kely?=) Date: Thu, 27 Oct 2016 23:20:41 -0700 (MST) Subject: [Lazarus] Online Package Manager In-Reply-To: References: Message-ID: <1477635641278-4050104.post@n3.nabble.com> Hi, We have made considerable progress with the online package manager. Next week the central repository will be populated with 30+ packages. Here is a short video(please watch it in 700p). https://youtu.be/y_hT8u2u5bU Suggestions are welcome. -- View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-Online-Package-Manager-tp4049766p4050104.html Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com. From getmem1 at gmail.com Fri Oct 28 08:24:28 2016 From: getmem1 at gmail.com (=?UTF-8?Q?Bal=C3=A1zs_Sz=C3=A9kely?=) Date: Thu, 27 Oct 2016 23:24:28 -0700 (MST) Subject: [Lazarus] TMouseinput mouse click. In-Reply-To: References: Message-ID: <1477635868285-4050105.post@n3.nabble.com> >>Is there a procedure to print a string at the cursor? uses MouseAndKeyInput, LCLType; procedure TForm1.Button1Click(Sender: TObject); var Str: String; begin MouseInput.Move([], 200, 75); MouseInput.Click(mbLeft,[], 200, 75); KeyInput.Press(VK_T); KeyInput.Press(VK_e); KeyInput.Press(VK_s); KeyInput.Press(VK_t); end; -- View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-TMouseinput-mouse-click-tp4050096p4050105.html Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com. From lazarus at kluug.net Fri Oct 28 09:16:06 2016 From: lazarus at kluug.net (Ondrej Pokorny) Date: Fri, 28 Oct 2016 09:16:06 +0200 Subject: [Lazarus] Online Package Manager In-Reply-To: <1477635641278-4050104.post@n3.nabble.com> References: <1477635641278-4050104.post@n3.nabble.com> Message-ID: <2bf1241e-0437-1ae2-4496-229ae85fdfe3@kluug.net> Very nice work! On 28.10.2016 8:20, Balázs Székely via Lazarus wrote: > Suggestions are welcome. Just a note: please mind the image policy of Lazarus - see trunk\images\README.txt (if you haven't done it already). Especially please keep track of image sources you use (e.g. in some kind of INFO.txt or whatever) - it's easy when you add images but hard after some years are gone :) Ondrej From sandro.cumerlato at gmail.com Fri Oct 28 09:26:02 2016 From: sandro.cumerlato at gmail.com (Sandro Cumerlato) Date: Fri, 28 Oct 2016 09:26:02 +0200 Subject: [Lazarus] LazarusIDE - Component Palette - OnMouseWheel Message-ID: Hello, I've noticed that the Component Palette is not rendered properly after an OnMouseWheel event over it. Look at the attached image to see what I mean. I've also noticed a frequent flickering of the LazarusIDE main menu. OS: Windows 10 Lazarus: svn trunk Best regards. Sandro Cumerlato -------------- next part -------------- A non-text attachment was scrubbed... Name: LazarusIDE.jpg Type: image/jpeg Size: 28077 bytes Desc: not available URL: From lazarus at kluug.net Fri Oct 28 09:32:36 2016 From: lazarus at kluug.net (Ondrej Pokorny) Date: Fri, 28 Oct 2016 09:32:36 +0200 Subject: [Lazarus] LazarusIDE - Component Palette - OnMouseWheel In-Reply-To: References: Message-ID: On 28.10.2016 9:26, Sandro Cumerlato via Lazarus wrote: > Hello, > I've noticed that the Component Palette is not rendered properly after > an OnMouseWheel event over it. > > Look at the attached image to see what I mean. Bart, maybe it's caused by your recent change of TPageControl.OnChange event (?) Ondrej From getmem1 at gmail.com Fri Oct 28 09:56:49 2016 From: getmem1 at gmail.com (=?UTF-8?Q?Bal=C3=A1zs_Sz=C3=A9kely?=) Date: Fri, 28 Oct 2016 00:56:49 -0700 (MST) Subject: [Lazarus] Online Package Manager In-Reply-To: <2bf1241e-0437-1ae2-4496-229ae85fdfe3@kluug.net> References: <1477635641278-4050104.post@n3.nabble.com> <2bf1241e-0437-1ae2-4496-229ae85fdfe3@kluug.net> Message-ID: <1477641409689-4050109.post@n3.nabble.com> Hi Ondrej, Thanks for the feedback! I only download/use free icons(free as a free beer :) ) from sites like this one: https://www.iconfinder.com/iconsets/32x32-free-design-icons It clearly states: "License: Free for commercial use (Include link to authors website)". I suppose it's ok to use them, if we leave a txt with a link? Balázs -- View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-Online-Package-Manager-tp4049766p4050109.html Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com. From aaa5500 at ya.ru Fri Oct 28 10:58:31 2016 From: aaa5500 at ya.ru (Alexey) Date: Fri, 28 Oct 2016 11:58:31 +0300 Subject: [Lazarus] CCR, how to send files? In-Reply-To: <362eee4c-2fc2-d194-3735-4b8ed12111bc@lumino.de> References: <362eee4c-2fc2-d194-3735-4b8ed12111bc@lumino.de> Message-ID: <6803f7b7-8456-72b9-a0da-ceb0d29c2f93@ya.ru> Hi I try to send mail to Vincent S, he is unreachable, mail cannot send. How to send my files to CCR? Alex From lazarus at kluug.net Fri Oct 28 11:08:12 2016 From: lazarus at kluug.net (Ondrej Pokorny) Date: Fri, 28 Oct 2016 11:08:12 +0200 Subject: [Lazarus] Online Package Manager In-Reply-To: <1477641409689-4050109.post@n3.nabble.com> References: <1477635641278-4050104.post@n3.nabble.com> <2bf1241e-0437-1ae2-4496-229ae85fdfe3@kluug.net> <1477641409689-4050109.post@n3.nabble.com> Message-ID: On 28.10.2016 9:56, Balázs Székely via Lazarus wrote: > I only download/use free icons(free as a free beer :) ) Be aware that CC license is not "free as a free beer" :) > from sites like this > one: > https://www.iconfinder.com/iconsets/32x32-free-design-icons > It clearly states: "License: Free for commercial use (Include link to > authors website)". I suppose it's ok to use them, if we leave a txt with a > link? Exactly. Keep track of used icons and list them by license/author in some text file. See e.g. lcl\images\copyright.txt . It makes things a lot easier in the future. Thanks! + Also make sure that you don't list iconfinder.com as a source but the original author - e.g. in case of your link above it's http://www.small-icons.com/packs/32x32-free-design-icons.htm . Ondrej From larrydalton71 at gmail.com Sat Oct 29 01:32:34 2016 From: larrydalton71 at gmail.com (Larry Dalton) Date: Fri, 28 Oct 2016 18:32:34 -0500 Subject: [Lazarus] TMouseinput mouse click. In-Reply-To: <1477635868285-4050105.post@n3.nabble.com> References: <1477635868285-4050105.post@n3.nabble.com> Message-ID: <7464B923-B0D3-4D72-BE02-6D2189D396CE@gmail.com> Everything is printing in lower case. How do I fix that? Sent from my iPhone On Oct 28, 2016, at 01:24, Balázs Székely via Lazarus wrote: >>> Is there a procedure to print a string at the cursor? > > uses MouseAndKeyInput, LCLType; > > procedure TForm1.Button1Click(Sender: TObject); > var > Str: String; > begin > MouseInput.Move([], 200, 75); > MouseInput.Click(mbLeft,[], 200, 75); > KeyInput.Press(VK_T); > KeyInput.Press(VK_e); > KeyInput.Press(VK_s); > KeyInput.Press(VK_t); > end; > > > > -- > View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-TMouseinput-mouse-click-tp4050096p4050105.html > Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com. > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus From larrydalton71 at gmail.com Sat Oct 29 07:07:00 2016 From: larrydalton71 at gmail.com (Larry Dalton) Date: Sat, 29 Oct 2016 00:07:00 -0500 Subject: [Lazarus] Linking error to lazarus components Message-ID: I have an application that requires MouseAndKeyInput.lpk. I am using lazarus_1.6-0_amd64.deb, fpc-src_3.0.0-151205_amd64.deb, on Linux Cinnamon. I also am using it on Windows 7, and Windows 10. It works great on the Windows boxes, but when I try to compile it on the two Linux systems, I get the following errors: /usr/bin/ld: warning: link.res contains output sections; did you forget -T? /usr/bin/ld: cannot find -lXtst LazCredProj.lpr(29,1) Error: Error while linking. I need a solutiont to this problem. -------------- next part -------------- An HTML attachment was scrubbed... URL: From kashken at csteldridge.com Sat Oct 29 07:23:19 2016 From: kashken at csteldridge.com (Ken Kashmarek) Date: Fri, 28 Oct 2016 22:23:19 -0700 (MST) Subject: [Lazarus] Run FPC on Raspberry Pi3 in command line mode Message-ID: <1477718599100-4050114.post@n3.nabble.com> I have been runing FPC v3 on Windows 7 from a command line window. The Windows 7 version of the IDE sucks. I want to run FPC v3 on my Raspberry Pi3 the same way, from a command line window (not the GUI IDE interface). Is that possible? I found everything for starting the IDE but not for starting the compiler directly (I will be using my own editor for source files). By the way, my install of FPC v3 on Raspberry Pi3 took less than 45 minutes but it did consume 840 meg of space on my SD card (I have a 28 gig partition so that was inconsequential). I do get an error message when the Lazarus 1.6 IDE starts but so far it seems to cause no problem. To Bo Berglund: Thank you for the install script. Very nice. Ken -- View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Run-FPC-on-Raspberry-Pi3-in-command-line-mode-tp4050114.html Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com. From wkitty42 at windstream.net Sat Oct 29 11:23:44 2016 From: wkitty42 at windstream.net (wkitty42 at windstream.net) Date: Sat, 29 Oct 2016 05:23:44 -0400 Subject: [Lazarus] Run FPC on Raspberry Pi3 in command line mode In-Reply-To: <1477718599100-4050114.post@n3.nabble.com> References: <1477718599100-4050114.post@n3.nabble.com> Message-ID: <07e465c3-7a5f-726a-1f1f-6d718f9f3b3a@windstream.net> On 10/29/2016 01:23 AM, Ken Kashmarek via Lazarus wrote: > I have been runing FPC v3 on Windows 7 from a command line window. The > Windows 7 version of the IDE sucks. > > I want to run FPC v3 on my Raspberry Pi3 the same way, from a command line > window (not the GUI IDE interface). > > Is that possible? I found everything for starting the IDE but not for > starting the compiler directly (I will be using my own editor for source > files). just like the old days with TP and/or BP... tp loads the editor. tpc runs the compiler. bp loads the editor. bpc runs the compiler. fp loads the editor. fpc runs the compiler. -- NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list* unless private contact is specifically requested and granted. From nc-gaertnma at netcologne.de Sat Oct 29 11:41:12 2016 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Sat, 29 Oct 2016 11:41:12 +0200 Subject: [Lazarus] Linking error to lazarus components In-Reply-To: References: Message-ID: <20161029114112.2f421cec@limapholos.matflo.wg> On Sat, 29 Oct 2016 00:07:00 -0500 Larry Dalton via Lazarus wrote: > I have an application that requires MouseAndKeyInput.lpk. I am using > lazarus_1.6-0_amd64.deb, fpc-src_3.0.0-151205_amd64.deb, on Linux Cinnamon. > I also am using it on Windows 7, and Windows 10. It works great on the > Windows boxes, but when I try to compile it on the two Linux systems, I get > the following errors: > /usr/bin/ld: warning: link.res contains output sections; did you forget -T? > /usr/bin/ld: cannot find -lXtst > LazCredProj.lpr(29,1) Error: Error while linking. > I need a solutiont to this problem. Have you tried to install libxtst-dev? Mattias From larrydalton71 at gmail.com Sat Oct 29 14:03:41 2016 From: larrydalton71 at gmail.com (Larry Dalton) Date: Sat, 29 Oct 2016 07:03:41 -0500 Subject: [Lazarus] Linking error to lazarus components In-Reply-To: <20161029114112.2f421cec@limapholos.matflo.wg> References: <20161029114112.2f421cec@limapholos.matflo.wg> Message-ID: Thanks! It worked. Sent from my iPhone > On Oct 29, 2016, at 04:41, Mattias Gaertner via Lazarus wrote: > > On Sat, 29 Oct 2016 00:07:00 -0500 > Larry Dalton via Lazarus wrote: > >> I have an application that requires MouseAndKeyInput.lpk. I am using >> lazarus_1.6-0_amd64.deb, fpc-src_3.0.0-151205_amd64.deb, on Linux Cinnamon. >> I also am using it on Windows 7, and Windows 10. It works great on the >> Windows boxes, but when I try to compile it on the two Linux systems, I get >> the following errors: >> /usr/bin/ld: warning: link.res contains output sections; did you forget -T? >> /usr/bin/ld: cannot find -lXtst >> LazCredProj.lpr(29,1) Error: Error while linking. >> I need a solutiont to this problem. > > Have you tried to install libxtst-dev? > > Mattias > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus From larrydalton71 at gmail.com Sat Oct 29 14:03:41 2016 From: larrydalton71 at gmail.com (Larry Dalton) Date: Sat, 29 Oct 2016 07:03:41 -0500 Subject: [Lazarus] Linking error to lazarus components In-Reply-To: <20161029114112.2f421cec@limapholos.matflo.wg> References: <20161029114112.2f421cec@limapholos.matflo.wg> Message-ID: Thanks! It worked. Sent from my iPhone > On Oct 29, 2016, at 04:41, Mattias Gaertner via Lazarus wrote: > > On Sat, 29 Oct 2016 00:07:00 -0500 > Larry Dalton via Lazarus wrote: > >> I have an application that requires MouseAndKeyInput.lpk. I am using >> lazarus_1.6-0_amd64.deb, fpc-src_3.0.0-151205_amd64.deb, on Linux Cinnamon. >> I also am using it on Windows 7, and Windows 10. It works great on the >> Windows boxes, but when I try to compile it on the two Linux systems, I get >> the following errors: >> /usr/bin/ld: warning: link.res contains output sections; did you forget -T? >> /usr/bin/ld: cannot find -lXtst >> LazCredProj.lpr(29,1) Error: Error while linking. >> I need a solutiont to this problem. > > Have you tried to install libxtst-dev? > > Mattias > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus From larrydalton71 at gmail.com Sat Oct 29 15:44:40 2016 From: larrydalton71 at gmail.com (Larry Dalton) Date: Sat, 29 Oct 2016 08:44:40 -0500 Subject: [Lazarus] TMouseinput mouse click. In-Reply-To: <1477635868285-4050105.post@n3.nabble.com> References: <1477635868285-4050105.post@n3.nabble.com> Message-ID: <874853EF-386C-4824-B964-DB583019C42F@gmail.com> I can't get it to print an uppercase letter Sent from my iPhone On Oct 28, 2016, at 01:24, Balázs Székely via Lazarus wrote: >>> Is there a procedure to print a string at the cursor? > > uses MouseAndKeyInput, LCLType; > > procedure TForm1.Button1Click(Sender: TObject); > var > Str: String; > begin > MouseInput.Move([], 200, 75); > MouseInput.Click(mbLeft,[], 200, 75); > KeyInput.Press(VK_T); > KeyInput.Press(VK_e); > KeyInput.Press(VK_s); > KeyInput.Press(VK_t); > end; > > > > -- > View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-TMouseinput-mouse-click-tp4050096p4050105.html > Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com. > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus From larrydalton71 at gmail.com Sat Oct 29 16:24:49 2016 From: larrydalton71 at gmail.com (Larry Dalton) Date: Sat, 29 Oct 2016 09:24:49 -0500 Subject: [Lazarus] VK_* problem. Message-ID: I have an application that requires MouseAndKeyInput.lpk. I am using lazarus_1.6-0_amd64.deb, fpc-src_3.0.0-151205_amd64.deb, on Linux Cinnamon. I also am using it on Windows 7, and Windows 10. I need to print strings at a certain position on a webpage. I can't get it to print uppercase letters. Here is the test procedure I am using: procedure TMain_Form.TestButtonClick(Sender: TObject); var test_string:string; right_string:boolean; begin KeyInput.Press(VK_L); KeyInput.Press(VK_a); KeyInput.Press(VK_r); KeyInput.Press(VK_r); KeyInput.Press(VK_y); KeyInput.Press(VK_SPACE); KeyInput.Press(VK_D); KeyInput.Press(VK_a); KeyInput.Press(VK_l); KeyInput.Press(VK_t); KeyInput.Press(VK_o); KeyInput.Press(VK_n); end; The resulting string is 'al'; It should be printing 'Larry Dalton'; Instead, it is printing 'larry dalton'; How can I get it to print the uppercase letters? -------------- next part -------------- An HTML attachment was scrubbed... URL: From larrydalton71 at gmail.com Sat Oct 29 16:27:07 2016 From: larrydalton71 at gmail.com (Larry Dalton) Date: Sat, 29 Oct 2016 09:27:07 -0500 Subject: [Lazarus] VK_* problem. In-Reply-To: References: Message-ID: I need to correct the previous email. The line 'The resulting string is 'al'' should not be there. On Sat, Oct 29, 2016 at 9:24 AM, Larry Dalton wrote: > I have an application that requires MouseAndKeyInput.lpk. I am using > lazarus_1.6-0_amd64.deb, fpc-src_3.0.0-151205_amd64.deb, on Linux > Cinnamon. > I also am using it on Windows 7, and Windows 10. > I need to print strings at a certain position on a webpage. > I can't get it to print uppercase letters. > Here is the test procedure I am using: > > > procedure TMain_Form.TestButtonClick(Sender: TObject); > var test_string:string; > right_string:boolean; > begin > KeyInput.Press(VK_L); > KeyInput.Press(VK_a); > KeyInput.Press(VK_r); > KeyInput.Press(VK_r); > KeyInput.Press(VK_y); > KeyInput.Press(VK_SPACE); > KeyInput.Press(VK_D); > KeyInput.Press(VK_a); > KeyInput.Press(VK_l); > KeyInput.Press(VK_t); > KeyInput.Press(VK_o); > KeyInput.Press(VK_n); > > end; > > The resulting string is 'al'; > It should be printing 'Larry Dalton'; > Instead, it is printing 'larry dalton'; > > How can I get it to print the uppercase letters? > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From getmem1 at gmail.com Sat Oct 29 16:59:58 2016 From: getmem1 at gmail.com (=?UTF-8?Q?Bal=C3=A1zs_Sz=C3=A9kely?=) Date: Sat, 29 Oct 2016 07:59:58 -0700 (MST) Subject: [Lazarus] VK_* problem. In-Reply-To: References: Message-ID: <1477753198878-4050121.post@n3.nabble.com> KeyInput.Down(VK_SHIFT); KeyInput.Press(VK_L); KeyInput.Up(VK_SHIFT); //... -- View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-VK-problem-tp4050119p4050121.html Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com. From vojtech.cihak at atlas.cz Sat Oct 29 17:17:25 2016 From: vojtech.cihak at atlas.cz (=?utf-8?q?Vojt=C4=9Bch_=C4=8Cih=C3=A1k?=) Date: Sat, 29 Oct 2016 17:17:25 +0200 Subject: [Lazarus] =?utf-8?q?TMouseinput_mouse_click=2E?= In-Reply-To: 0000000066990001a54400f25005 References: , , , <1477635868285-4050105.post@n3.nabble.com> 0000000066990001a54400f25005 Message-ID: <20161029171725.4F02D30C@atlas.cz> Hi, this works. Just check all methods available in KeyInput and MouseInput to see what it can really do.     KeyInput.Apply([ssShift]);   KeyInput.Press(VK_T);   KeyInput.Unapply([ssShift]);   KeyInput.Press(VK_e);   KeyInput.Press(VK_s);   KeyInput.Press(VK_t);     V. ______________________________________________________________ > Od: Larry Dalton via Lazarus > Komu: Lazarus mailing list > Datum: 29.10.2016 15:44 > Předmět: Re: [Lazarus] TMouseinput mouse click. > I can't get it to print an uppercase letter From silvioprog at gmail.com Sat Oct 29 17:18:24 2016 From: silvioprog at gmail.com (silvioprog) Date: Sat, 29 Oct 2016 12:18:24 -0300 Subject: [Lazarus] VK_* problem. In-Reply-To: <1477753198878-4050121.post@n3.nabble.com> References: <1477753198878-4050121.post@n3.nabble.com> Message-ID: On Sat, Oct 29, 2016 at 11:59 AM, Balázs Székely via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > KeyInput.Down(VK_SHIFT); > KeyInput.Press(VK_L); > KeyInput.Up(VK_SHIFT); > //... It allows you to send string too, eg: KeyInput.Press('hello WORLD'); -- Silvio Clécio -------------- next part -------------- An HTML attachment was scrubbed... URL: From larrydalton71 at gmail.com Sat Oct 29 20:43:24 2016 From: larrydalton71 at gmail.com (Larry Dalton) Date: Sat, 29 Oct 2016 13:43:24 -0500 Subject: [Lazarus] VK_* problem. In-Reply-To: References: <1477753198878-4050121.post@n3.nabble.com> Message-ID: <44251212-6631-427E-B52A-2D05E99ED706@gmail.com> Thanks! Sent from my iPhone > On Oct 29, 2016, at 10:18, silvioprog via Lazarus wrote: > >> On Sat, Oct 29, 2016 at 11:59 AM, Balázs Székely via Lazarus wrote: >> KeyInput.Down(VK_SHIFT); >> KeyInput.Press(VK_L); >> KeyInput.Up(VK_SHIFT); >> //... > > > It allows you to send string too, eg: > > KeyInput.Press('hello WORLD'); > > -- > Silvio Clécio > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: From larrydalton71 at gmail.com Sun Oct 30 04:35:39 2016 From: larrydalton71 at gmail.com (Larry Dalton) Date: Sat, 29 Oct 2016 22:35:39 -0500 Subject: [Lazarus] TMouseinput mouse click. In-Reply-To: <20161029171725.4F02D30C@atlas.cz> References: <1477635868285-4050105.post@n3.nabble.com> <20161029171725.4F02D30C@atlas.cz> Message-ID: That helps a lot! Thanks to all of you! Sent from my iPhone > On Oct 29, 2016, at 10:17, Vojtěch Čihák via Lazarus wrote: > > Hi, this works. Just check all methods available in KeyInput and MouseInput to see what it can really do. > > KeyInput.Apply([ssShift]); > KeyInput.Press(VK_T); > KeyInput.Unapply([ssShift]); > KeyInput.Press(VK_e); > KeyInput.Press(VK_s); > KeyInput.Press(VK_t); > > V. > ______________________________________________________________ >> Od: Larry Dalton via Lazarus >> Komu: Lazarus mailing list >> Datum: 29.10.2016 15:44 >> Předmět: Re: [Lazarus] TMouseinput mouse click. >> > I can't get it to print an uppercase letter > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > http://lists.lazarus-ide.org/listinfo/lazarus From kashken at csteldridge.com Sun Oct 30 08:05:02 2016 From: kashken at csteldridge.com (Ken Kashmarek) Date: Sun, 30 Oct 2016 00:05:02 -0700 (MST) Subject: [Lazarus] FPC on Rpi3 executable module sizes Message-ID: <1477811102597-4050126.post@n3.nabble.com> I have a group of programs that compile using FPC on Windows 7. I have ported those programs over to my RPi3 and they all compile fine. On Windows 7, the executable files are significantly smaller (less 100K) than those from the IDE on RPi3 (all 400K & larger). There may be ways to reduce these sizes. However, it seems that linking on the RPi3 is not as advanced as on Windows (it looks like the entire library is being included rather than just the invoked modules). Here is a quick comparison of one program: On Windows 7 (output from the dir command): SIZE 10/29/2016 08:00 AM 97,792 hello.exe 10/29/2016 08:00 AM 14,191 hello.o 10/20/2016 01:25 PM 5,162 hello.pas On RPi3 (output from ls -l): SIZE -rwxr-xr-x 1 pi pi 408892 Oct 29 07:47 hello -rw-r--r-- 1 pi pi 12876 Oct 29 07:47 hello.o -rw-r----- 1 pi pi 5164 Oct 29 07:47 hello.pas The executable file sizes are rather extreme for programs tha run from an terminal session. The output from execution is the same. I have turned off a number of options that could have been contributing to this issue (such as eliminaing debug code and symbols). Any possible considerations for the size difference? -- View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/FPC-on-Rpi3-executable-module-sizes-tp4050126.html Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com. From bo.berglund at gmail.com Sun Oct 30 08:34:36 2016 From: bo.berglund at gmail.com (Bo Berglund) Date: Sun, 30 Oct 2016 08:34:36 +0100 Subject: [Lazarus] FPC on Rpi3 executable module sizes References: <1477811102597-4050126.post@n3.nabble.com> Message-ID: On Sun, 30 Oct 2016 00:05:02 -0700 (MST), Ken Kashmarek via Lazarus wrote: >On RPi3 (output from ls -l): > SIZE >-rwxr-xr-x 1 pi pi 408892 Oct 29 07:47 hello >-rw-r--r-- 1 pi pi 12876 Oct 29 07:47 hello.o >-rw-r----- 1 pi pi 5164 Oct 29 07:47 hello.pas > > >The executable file sizes are rather extreme for programs tha run from an >terminal session. The output from execution is the same. > > >I have turned off a number of options that could have been contributing to >this issue (such as eliminaing debug code and symbols). > > >Any possible considerations for the size difference? Debug symbols still included in the output maybe? Try this: strip -s hello -- Bo Berglund Developer in Sweden From bo.berglund at gmail.com Sun Oct 30 08:37:12 2016 From: bo.berglund at gmail.com (Bo Berglund) Date: Sun, 30 Oct 2016 08:37:12 +0100 Subject: [Lazarus] Run FPC on Raspberry Pi3 in command line mode References: <1477718599100-4050114.post@n3.nabble.com> Message-ID: On Fri, 28 Oct 2016 22:23:19 -0700 (MST), Ken Kashmarek via Lazarus wrote: >To Bo Berglund: Thank you for the install script. Very nice. Not updated in quite a while, so I don't know how current it is... Been busy with other stuff for some time so I have not checked FPC/Lazarus developments lately. -- Bo Berglund Developer in Sweden From kashken at csteldridge.com Sun Oct 30 18:32:03 2016 From: kashken at csteldridge.com (Ken Kashmarek) Date: Sun, 30 Oct 2016 10:32:03 -0700 (MST) Subject: [Lazarus] FPC on Rpi3 executable module sizes In-Reply-To: References: <1477811102597-4050126.post@n3.nabble.com> Message-ID: <1477848722999-4050129.post@n3.nabble.com> FCP on Rapsberry Pi3 On my Window 7 node, a null program produces this output when compiled from the command line: 10/30/2016 11:36 AM 31,744 nullpgm.exe 10/30/2016 11:36 AM 3,141 nullpgm.o 10/30/2016 09:19 AM 574 nullpgm.pas When the Build menu item is selected under Lazurus on RPi3: -rwxr-xr-x 1 pi pi 200548 Oct 30 09:19 nullpgm -rw-r--r-- 1 pi pi 3356 Oct 30 09:19 nullpgm.o -rw-rw---- 1 pi pi 574 Oct 30 09:19 nullpgm.pas While the object code generated (nullpgm.o) is relatively the same, the executable is out of sight on the RPi3. What is being included here? When one uses item (uses sysutils;) is added, the Window 7 executable goes up to over 80K in size. On the RPi3, goes up to over 400K in size. If 3 items are in the uses line, the RPi3 executable exceeds 800K. This is clearly an error where each addition adds 200k (or more) the the executable file. I do note however, that all 3 uses entries on Windows 7, brings the executable up to more than 240K (significantly smaller than the RPi3 install of FCP produces). Here is the program listing: program nullpgm(input,output); {$SMARTLINK ON} {$DEBUGINFO OFF} uses sysutils; // , variants, classes; type ptr2Byte = ^Byte; comp = int64; var i,j: integer; begin writeln; i := 4096; writeln('Value of i = ',i:8); writeln('--> Execution of (nearly) null program ended.'); writeln; end. -- View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/FPC-on-Rpi3-executable-module-sizes-tp4050126p4050129.html Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com. From noreply at z505.com Sun Oct 30 21:39:33 2016 From: noreply at z505.com (Lars) Date: Sun, 30 Oct 2016 14:39:33 -0600 Subject: [Lazarus] Run FPC on Raspberry Pi3 in command line mode In-Reply-To: <1477718599100-4050114.post@n3.nabble.com> References: <1477718599100-4050114.post@n3.nabble.com> Message-ID: <1e46ba1e2ebc3603374beb84f48cc5f3.squirrel@gator3286.hostgator.com> On Fri, October 28, 2016 11:23 pm, Ken Kashmarek via Lazarus wrote: > I have been runing FPC v3 on Windows 7 from a command line window. The > Windows 7 version of the IDE sucks. > By IDE do you mean lazarus, or the freepascal IDE which is different (like turbopascal). There is an FPC mailing list too.... if you just end up using FPC as a command line program, fpc mailing list is definitely where the questions sho > I found everything for starting the IDE but not for > starting the compiler directly (I will be using my own editor for source > files). To use FPC there is no need to install lazarus, you can just install fpc and run fpc from the command line. Lazarus is geared toward delphi style development, whereas FPC compiler from freepascal.org is more like a gnu c compiler at the command line, or, if you prefer, more like turbo pascal if you prefer to use a bright blue (keeps you up at night) console mode ide. There is no requirement to use the console mode ide, nore is there any requirement to use Lazarus delphi like IDE. freeepascal.org has downloads and a separate mailing list just for fpc. THis is the lazarus delphi like IDE mailing list From noreply at z505.com Sun Oct 30 22:31:55 2016 From: noreply at z505.com (Lars) Date: Sun, 30 Oct 2016 15:31:55 -0600 Subject: [Lazarus] Chromium embedded on freebsd or firefox embedded In-Reply-To: References: <112e6de3de0bf319f54e6dea76dd2416.squirrel@gator3286.hostgator.com> <8bf7386e-f04e-a684-0e4b-3846c84cd165@gmail.com> <776c36ce96b171ea46446446fa6fdae9.squirrel@gator3286.hostgator.com> Message-ID: On Mon, October 24, 2016 5:33 am, José Mejuto via Lazarus wrote: > Hello, > > > Yes, currently Chromium seems to be better, but anyway it will need a > lot of work starting from the CEF as if my brain serves me CEF API is C++ > so you will find the same problem as Qt interface, a very big DLL/so to > convert C++ to plain C functions that will need a quite good maintain. > http://wiki.freepascal.org/fpCEF3 I was under the impression someone had already done a lot of the work already porting all the C++ code... Just wondered if it was usable on BD or mostly focused on Windows and linux... also macosx interests me. >> I wonder how often chromium embedded breaks their api, or changes the >> V8 >> engine so that old stuff no longer works. > > As far as I know it is quite stable now. > > Just found out that some things in CEF1 are no longer working in CEF3: example: they removed the Listener functions which were really useful, now you have to use javascript listener code instead. So they have broken some stuff from CEF1 to CEF3 but probably not nearly as broken as firefox embedded! This is because firefox never started out as a multi process browser, whereas chromium had a head start on multi process. >> One thing I'd really like is a single DLL to ship with an application >> instead of mounds and mounds of files that these embedded solutions >> require. However I guess that's not going to happen. > > No for sure, that will not happen :) unless you use some dirty tricks. > In the past I was able to "inject" 3 or 4 DLLs in my EXE and use them, > but only in 32 bits Windows and I was unable to port the code to the 64 > bits windows loader (it basically performs the same actions Windows do > when load a DLL from disk, but the function loads it from a resource and > adjust the call pointers and other things as Windows will do it). > > Of course that method will not with all DLLs. Interesting, I've heard of similar delphi tricks before of embedding exe's or dll's inside exe's in order to ship a single binary .. In fact this brings back nostalgia of reading about it 10-14 years ago. From noreply at z505.com Sun Oct 30 22:43:34 2016 From: noreply at z505.com (Lars) Date: Sun, 30 Oct 2016 15:43:34 -0600 Subject: [Lazarus] Online Package Manager In-Reply-To: <1477635641278-4050104.post@n3.nabble.com> References: <1477635641278-4050104.post@n3.nabble.com> Message-ID: <0ba11f36bd5026aebc46e6ee51acc799.squirrel@gator3286.hostgator.com> On Fri, October 28, 2016 12:20 am, Balázs Székely via Lazarus wrote: > Hi, > > > We have made considerable progress with the online package manager. Next > week the central repository will be populated with 30+ packages. Here is a > short video(please watch it in 700p). > > https://youtu.be/y_hT8u2u5bU > > > Suggestions are welcome. > > Now all that is needed is something like Torry.net which indexes and offers search for all the components. This is something that has kept me using delphi/lazarus instead of Visual C++, as visual C++ has absolutely nothing for websites offering components... I have no clue where msvc users get their components from, they seem to roll their own or use codeproject.com The current lazarus code repository on sourceforge and spread about throughout the wiki is good, but a website like torry.net that centrally indexes the stuff would be great. In fact I was interested in working on such a project at one time but paid projects were more of a priority so I put it on the back burner. Also, interesting that Torry still has no real lazarus section AFAIK... it's almost as if torry doesn't much care about fpc/lazarus. There were rumors that they were going to add it at some point; not sure whatever happened. From rgrunsky at sympatico.ca Sun Oct 30 23:50:28 2016 From: rgrunsky at sympatico.ca (Rolf Grunsky) Date: Sun, 30 Oct 2016 18:50:28 -0400 Subject: [Lazarus] How to use strings properly with fixes_1_6 and FPC 3.0.0? In-Reply-To: <0db5b44221ff4a21124dcd5523b41e29.squirrel@gator3286.hostgator.com> References: <435f528d-260c-ff77-aa0c-c4dded0ec5cd@yahoo.com> <87e1a148-6d6f-14ce-63b4-024a3a68f80a@sympatico.ca> <0db5b44221ff4a21124dcd5523b41e29.squirrel@gator3286.hostgator.com> Message-ID: On 10/30/2016 06:15 PM, Lars wrote: > Off topic, off list, but.. > >> -- >> TRUTH in her dress finds facts too tight. >> In fiction she moves with ease. >> Stray Birds by Rabindranath Tagore > > > > What does this mean? > Something about this: > http://www.the-niceguy.com/articles/Nutballs.html > > The only thing I can think of is a woman wearing a dress, that is tight, > and is incapable of processing facts. I double take on complicated english > quotations. > Yah, it's way off topic but I'll bite just this once. It's poetry. It's not to be taken literally. If your native language is not English, it may give you some problems. For the record, Rabindranath Tagore was an Indian writer. The quote is from his book "Stray Birds". What this couplet is saying is that sometimes it is easier to use a fictional account to express something true. As I've said it is poetry, these are metaphors, figures of speech. I find much of Tagore's language very beautiful. We've chosen another Tagore "Stray Bird" as the epitaph on our grave marker. Here are a couple more from "Stray Birds": The mind, sharp but not broad, sticks at every point but does not move. and A mind all logic is like a knife all blade. It makes the hand bleed that uses it. There are many more... -- TRUTH in her dress finds facts too tight. In fiction she moves with ease. Stray Birds by Rabindranath Tagore From hfiandor at ceniai.inf.cu Mon Oct 31 00:27:03 2016 From: hfiandor at ceniai.inf.cu (hfiandor) Date: Sun, 30 Oct 2016 19:27:03 -0400 Subject: [Lazarus] mensaje de espera Message-ID: Estimados listeros: Tengo una form con un botón Ver Informe. Al hacer click en el botón se realizan operaciones que consumen algunos segundos. Tengo un ProgressBar para indicar que esta corriendo. Quisiera añadir un label que diga Espere unos segundos. Que aparezca cuando se clickea Ver informe y se haga invisible al terminar el ciclo. Puse un label con visible:=false en diseño. Cambio a visible:=true al inicio del procedure Ver Inicio y donde quiero hago visible:=false; No me funciona bien, confunde el orden de las pantallas, etc. Si me pueden ayudar, lo agradezco. Saludos Ing. Héctor F. Fiandor Rosario -------------- next part -------------- An HTML attachment was scrubbed... URL: From kashken at csteldridge.com Mon Oct 31 05:34:53 2016 From: kashken at csteldridge.com (Ken Kashmarek) Date: Sun, 30 Oct 2016 21:34:53 -0700 (MST) Subject: [Lazarus] Run FPC on Raspberry Pi3 in command line mode In-Reply-To: <1e46ba1e2ebc3603374beb84f48cc5f3.squirrel@gator3286.hostgator.com> References: <1477718599100-4050114.post@n3.nabble.com> <1e46ba1e2ebc3603374beb84f48cc5f3.squirrel@gator3286.hostgator.com> Message-ID: <1477888493910-4050135.post@n3.nabble.com> On Windows 7, the IDE is tagged FPC in the desktop icon and is called Free Pascal. It is not referred to as Lazarus. All my programs at this point are command line oriented. I have been using the IDE on RPi3 with the Build menu item (under Run), and then switching to a command line window in the target directory for testing. Thanks for responding. Ken At 03:40 PM 10/30/2016, you wrote: >On Fri, October 28, 2016 11:23 pm, Ken Kashmarek via Lazarus >wrote: > I have been runing FPC v3 on Windows 7 from a command line >window. The > Windows 7 version of the IDE sucks. > By IDE do you >mean lazarus, or the freepascal IDE which is different (like >turbopascal). There is an FPC mailing list too.... if you just end >up using FPC as a command line program, fpc mailing list is >definitely where the questions sho > I found everything for starting >the IDE but not for > starting the compiler directly (I will be >using my own editor for source > files). To use FPC there is no need >to install lazarus, you can just install fpc and run fpc from the >command line. Lazarus is geared toward delphi style development, >whereas FPC compiler from freepascal.org is more like a gnu c >compiler at the command line, or, if you prefer, more like turbo >pascal if you prefer to use a bright blue (keeps you up at night) >console mode ide. There is no requirement to use the console mode >ide, nore is there any requirement to use Lazarus delphi like IDE. >freeepascal.org has downloads and a separate mailing list just for >fpc. THis is the lazarus delphi like IDE mailing list -- >_______________________________________________ Lazarus mailing list >[hidden email] >http://lists.lazarus-ide.org/listinfo/lazarus > > >If you reply to this email, your message will be added to the >discussion below: >http://free-pascal-lazarus.989080.n3.nabble.com/Run-FPC-on-Raspberry-Pi3-in-command-line-mode-tp4050114p4050130.html > >To unsubscribe from Run FPC on Raspberry Pi3 in command line mode, >click >here. >NAML > -- View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Run-FPC-on-Raspberry-Pi3-in-command-line-mode-tp4050114p4050135.html Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: