From luca at wetron.es Sat Jun 1 12:18:55 2019 From: luca at wetron.es (Luca Olivetti) Date: Sat, 1 Jun 2019 12:18:55 +0200 Subject: [Lazarus] really strange messagedlg hang In-Reply-To: <0ae3847a-5bb0-6dc9-d131-c81d699c7b97@wetron.es> References: <0ae3847a-5bb0-6dc9-d131-c81d699c7b97@wetron.es> Message-ID: <05a2c505-8cbe-5fba-8374-4ab6c42318e6@wetron.es> El 31/5/19 a les 17:16, Luca Olivetti via lazarus ha escrit: > If I recompile it with lazarus 2.0.2[*]/fpc 3.2.beta (cannot use 3.0.2 > due to the above mentioned thread issue) the problem disappears. It also disappears (with lazarus 1.6.4/fpc 2.6.4) if I turn off the option "use manifest file to enable themes" > Any idea? The question still stands. Maybe a bug with themes in lazarus 1.6.4? Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From aaa5500 at ya.ru Sat Jun 1 15:15:55 2019 From: aaa5500 at ya.ru (AlexeyT) Date: Sat, 1 Jun 2019 16:15:55 +0300 Subject: [Lazarus] Win32 TPenStyle psDot is ugly In-Reply-To: <0B0A1CF5-CD4E-4CEE-B2CA-5B163F11A941@gmail.com> References: <52c60be3-e91a-9a3e-dabf-a16182016449@ya.ru> <0B0A1CF5-CD4E-4CEE-B2CA-5B163F11A941@gmail.com> Message-ID: <00f86c5a-d2f0-175d-b9e4-d20b6fc4cf92@ya.ru> Thanks for this info, made a patch for Grids. > 1 pixel dots followed by 1 pixel spaces then this works for dotted Geometric (Cosmetic = false) pen -- Regards, Alexey From sysrpl at gmail.com Sat Jun 1 19:01:18 2019 From: sysrpl at gmail.com (Anthony Walter) Date: Sat, 1 Jun 2019 13:01:18 -0400 Subject: [Lazarus] New application - Mac OSX Problems Message-ID: I wrote a new application for both Windows and Linux: https://www.getlazarus.org/apps/backer/ It was a favor for a less than computer literate friend who couldn't open a terminal and run rsync backing up of their video work to two redundant network drives. The program works fine on both my Linux and Mac computers, but on his Mac laptop there is an issue. The rsync seems to run, but is not actually copying files. I've looked at rsync manually on his computer from the terminal and it works. When I run the exact same command from my Lazarus program (inside a thread) the thread completes as if everything worked, but no files are actually copied through rsync. Could someone take a gander at this little bit of code and possible decipher why it's failing on his Mac, but not on my Mac or Linux computer? https://www.getlazarus.org/apps/backer/ The thread is created passing it to list of strings, the source folders, and the dest folders. The thread then creates private copies of those items as FSource and FDest and calls inherited Create(False). The execute procedure FreeOnTerminates, then loops through each source, rsyncing it to each dest location. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sysrpl at gmail.com Sun Jun 2 15:04:31 2019 From: sysrpl at gmail.com (Anthony Walter) Date: Sun, 2 Jun 2019 09:04:31 -0400 Subject: [Lazarus] New application - Mac OSX Problems In-Reply-To: References: Message-ID: I added some logging and updated the web page with more information. Hopefully I can figure out what's causing the problem through the logs. Also people are talking about Pascal over on r/Linux due to my submission right now. At this moment the top link on that subreddit. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dhkblaszyk at gmail.com Sun Jun 2 21:22:49 2019 From: dhkblaszyk at gmail.com (Darius Blaszyk) Date: Sun, 2 Jun 2019 21:22:49 +0200 Subject: [Lazarus] How to do insert/update and select on database Message-ID: Hi, I'm new to database programming with Lazarus. So hence possible a couple of obvious questions! I would like to do inserts, selects, and updates on a single SQLite database. I am now using multiple SQLQuery components with all their own queries. Is this the way it should work? After a commit, the SQLQuery that populates the DBGrid is closed. Is this supposed to happen? The transaction component is set to caCommitRetaining. I believe I read somewhere that it should remain open in that case. TIA! Darius -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at freepascal.org Sun Jun 2 22:55:20 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Sun, 2 Jun 2019 22:55:20 +0200 (CEST) Subject: [Lazarus] How to do insert/update and select on database In-Reply-To: References: Message-ID: On Sun, 2 Jun 2019, Darius Blaszyk via lazarus wrote: > Hi, > > I'm new to database programming with Lazarus. So hence possible a couple of > obvious questions! > > I would like to do inserts, selects, and updates on a single SQLite > database. I am now using multiple SQLQuery components with all their own > queries. Is this the way it should work? It is one way to work. I usually do the same. > After a commit, the SQLQuery that populates the DBGrid is closed. Is this > supposed to happen? The transaction component is set to caCommitRetaining. > I believe I read somewhere that it should remain open in that case. No, this is not what it means. You should avoid caCommitRetaining. There is an option on TSQLQuery, sqoKeepOpenOnCommit Documented here: https://docs.freepascal.org/docs-html/current/fcl/sqldb/tsqlquery.options.html It does what you want. Michael. From dhkblaszyk at gmail.com Mon Jun 3 14:21:22 2019 From: dhkblaszyk at gmail.com (Darius Blaszyk) Date: Mon, 3 Jun 2019 14:21:22 +0200 Subject: [Lazarus] How to do insert/update and select on database In-Reply-To: References: Message-ID: Op zo 2 jun. 2019 om 22:55 schreef Michael Van Canneyt via lazarus < lazarus at lists.lazarus-ide.org> > > > On Sun, 2 Jun 2019, Darius Blaszyk via lazarus wrote: > > > Hi, > > > > I'm new to database programming with Lazarus. So hence possible a couple > of > > obvious questions! > > > > I would like to do inserts, selects, and updates on a single SQLite > > database. I am now using multiple SQLQuery components with all their own > > queries. Is this the way it should work? > > It is one way to work. I usually do the same. > > > After a commit, the SQLQuery that populates the DBGrid is closed. Is this > > supposed to happen? The transaction component is set to > caCommitRetaining. > > I believe I read somewhere that it should remain open in that case. > > No, this is not what it means. You should avoid caCommitRetaining. > > There is an option on TSQLQuery, sqoKeepOpenOnCommit > > Documented here: > > > https://docs.freepascal.org/docs-html/current/fcl/sqldb/tsqlquery.options.html > > It does what you want. Thanks. As always good and to the point advice! Regards, Darius -------------- next part -------------- An HTML attachment was scrubbed... URL: From wkitty42 at windstream.net Mon Jun 3 14:56:35 2019 From: wkitty42 at windstream.net (wkitty42 at windstream.net) Date: Mon, 3 Jun 2019 08:56:35 -0400 Subject: [Lazarus] How to do insert/update and select on database In-Reply-To: References: Message-ID: On 6/3/19 8:21 AM, Darius Blaszyk via lazarus wrote: > Thanks. As always good and to the point advice! AKA "Bikini format" - short and to the point -=B-) -- NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list unless* *a signed and pre-paid contract is in effect with us.* From sysrpl at gmail.com Mon Jun 3 21:31:31 2019 From: sysrpl at gmail.com (Anthony Walter) Date: Mon, 3 Jun 2019 15:31:31 -0400 Subject: [Lazarus] Cocoa Widet Set Status Message-ID: Can anyone tell me in brief what is the current status of Lazarus on the Cocoa widget set on Mac? Does the IDE work at all? What is working and what fundamental stuff is significantly broken? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From nc-gaertnma at netcologne.de Mon Jun 3 22:05:27 2019 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Mon, 3 Jun 2019 22:05:27 +0200 Subject: [Lazarus] Cocoa Widet Set Status In-Reply-To: References: Message-ID: <20190603220527.41e2a032@limapholos.matflo.wg> On Mon, 3 Jun 2019 15:31:31 -0400 Anthony Walter via lazarus wrote: > Can anyone tell me in brief what is the current status of Lazarus on > the Cocoa widget set on Mac? Does the IDE work at all? What is > working and what fundamental stuff is significantly broken? I work with the Cocoa IDE and anchordocking. Works stable. Source editor popup menu does not work here. But I hardly need that. Mattias From mail at michael-ring.org Mon Jun 3 22:17:24 2019 From: mail at michael-ring.org (Michael Ring) Date: Mon, 3 Jun 2019 22:17:24 +0200 Subject: [Lazarus] Cocoa Widet Set Status In-Reply-To: <20190603220527.41e2a032@limapholos.matflo.wg> References: <20190603220527.41e2a032@limapholos.matflo.wg> Message-ID: Same here, I am also using anchordocking and the ide is quite stable for day to day work. Michael Am 03.06.19 um 22:05 schrieb Mattias Gaertner via lazarus: > On Mon, 3 Jun 2019 15:31:31 -0400 > Anthony Walter via lazarus wrote: > >> Can anyone tell me in brief what is the current status of Lazarus on >> the Cocoa widget set on Mac? Does the IDE work at all? What is >> working and what fundamental stuff is significantly broken? > I work with the Cocoa IDE and anchordocking. > Works stable. > Source editor popup menu does not work here. But I hardly need that. > > Mattias From skalogryz.lists at gmail.com Mon Jun 3 22:22:45 2019 From: skalogryz.lists at gmail.com (Dmitry Boyarintsev) Date: Mon, 3 Jun 2019 16:22:45 -0400 Subject: [Lazarus] Cocoa Widet Set Status In-Reply-To: <20190603220527.41e2a032@limapholos.matflo.wg> References: <20190603220527.41e2a032@limapholos.matflo.wg> Message-ID: On Mon, Jun 3, 2019 at 4:05 PM Mattias Gaertner via lazarus < lazarus at lists.lazarus-ide.org> wrote: > popup menu does not work here. But I hardly need that. > Need more hints: https://bugs.freepascal.org/view.php?id=35225#c116395 thanks, Dmitry -------------- next part -------------- An HTML attachment was scrubbed... URL: From sysrpl at gmail.com Wed Jun 5 06:09:03 2019 From: sysrpl at gmail.com (Anthony Walter) Date: Wed, 5 Jun 2019 00:09:03 -0400 Subject: [Lazarus] Yes another reason to run Linux Message-ID: For those of you unfamiliar with Cody's Lab, Cody is a geologist and chemist youtuber. On his blab channel he found another reason to run Linux. I thought you guys into FPC and Lazarus might find Cody's recent observations interesting https://www.youtube.com/watch?v=k66p-raVkdU -------------- next part -------------- An HTML attachment was scrubbed... URL: From de.jean.7777 at gmail.com Wed Jun 5 09:04:05 2019 From: de.jean.7777 at gmail.com (Dejan Boras) Date: Wed, 5 Jun 2019 09:04:05 +0200 Subject: [Lazarus] Yes another reason to run Linux In-Reply-To: References: Message-ID: Not to defend MS, but those "ads" can be disabled, and he needs to change his default lock screen background. But, the reason I use (mostly) Linux over Windows is that FPC and Lazarus projects build and compile a lot faster on Linux :D On Wed, Jun 5, 2019 at 6:09 AM Anthony Walter via lazarus < lazarus at lists.lazarus-ide.org> wrote: > For those of you unfamiliar with Cody's Lab, Cody is a geologist and > chemist youtuber. On his blab channel he found another reason to run Linux. > I thought you guys into FPC and Lazarus might find Cody's recent > observations interesting > > https://www.youtube.com/watch?v=k66p-raVkdU > -- > _______________________________________________ > lazarus mailing list > lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From svaa at ciberpiula.net Wed Jun 5 10:19:14 2019 From: svaa at ciberpiula.net (Santiago A.) Date: Wed, 5 Jun 2019 10:19:14 +0200 Subject: [Lazarus] Yes another reason to run Linux In-Reply-To: References: Message-ID: <3c642ac9-d245-6b37-8735-7c38403554bd@ciberpiula.net> El 05/06/19 a las 09:04, Dejan Boras via lazarus escribió: > Not to defend MS, but those "ads" can be disabled, and he needs to > change his default lock screen background. But, the reason I use > (mostly) Linux over Windows is that FPC and Lazarus projects build and > compile a lot faster on Linux :D This a little off-topic. Better for FPC-Others I can't find any excuse for Microsoft. The fact is that they have turn computers into TVs with commercials but instead of shows/series/movies they have software and instead of audience they have users, and instead of commercials "ads" and datamining. When did computers world go wrong? -- Saludos Santiago A. From michael at freepascal.org Wed Jun 5 11:58:47 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Wed, 5 Jun 2019 11:58:47 +0200 (CEST) Subject: [Lazarus] Yes another reason to run Linux In-Reply-To: <3c642ac9-d245-6b37-8735-7c38403554bd@ciberpiula.net> References: <3c642ac9-d245-6b37-8735-7c38403554bd@ciberpiula.net> Message-ID: On Wed, 5 Jun 2019, Santiago A. via lazarus wrote: > El 05/06/19 a las 09:04, Dejan Boras via lazarus escribió: >> Not to defend MS, but those "ads" can be disabled, and he needs to >> change his default lock screen background. But, the reason I use >> (mostly) Linux over Windows is that FPC and Lazarus projects build and >> compile a lot faster on Linux :D > > This a little off-topic. Better for FPC-Others > I can't find any excuse for Microsoft. The fact is that they have turn > computers into TVs with commercials but instead of shows/series/movies > they have software and instead of audience they have users, and instead > of commercials "ads" and datamining. > When did computers world go wrong? One explanation I read is that this is the fault of open source: This forces the 'big' companies to make software available for free, and thus they now run on commercials. Total nonsense of course; there is simply more money to be made using commercials than using subscriptions. No-one wants to pay subscription money for "basic" software. That's probably also the problem that will kill Delphi faster sooner than later :( Michael. From d.ioannidis at nephelae.eu Thu Jun 6 16:59:24 2019 From: d.ioannidis at nephelae.eu (Dimitrios Chr. Ioannidis) Date: Thu, 06 Jun 2019 17:59:24 +0300 Subject: [Lazarus] fpdebug apps Message-ID: Hi, if I remember correctly, there was a standalone fpdebug application. Am I correct ? Because I could not build any project from the fpdebug/app dir. PS: I used a fresh svn update for fpc trunk and Lazarus trunk. regards, -- Dimitrios Chr. Ioannidis From lazarus at mfriebe.de Thu Jun 6 22:20:09 2019 From: lazarus at mfriebe.de (Martin Frb) Date: Thu, 6 Jun 2019 22:20:09 +0200 Subject: [Lazarus] fpdebug apps In-Reply-To: References: Message-ID: On 06/06/2019 16:59, Dimitrios Chr. Ioannidis via lazarus wrote: > Hi, > >   if I remember correctly, there was a standalone fpdebug application. > Am I correct ? Because I could not build any project from the > fpdebug/app dir. > > PS: I used a fresh svn update for fpc trunk and Lazarus trunk. Indeed, they are currently broken. I did fix some of the compile errors (Those I had previously fixed in fpdserver, so I knew how to fix them). But there are some more. The one in breakpoints, stem from the fact that more than one breakpoint can be set to the same address. But the original design had not foreseen that. It looks like fpd has a command do delete "the" breakpoint at "address". But that is not possible. So that needs a redesign (or be made "all" brkpnt at addr). Haven't looked any further. From leobronstain at gmail.com Thu Jun 6 22:45:41 2019 From: leobronstain at gmail.com (leyba bronstain) Date: Thu, 6 Jun 2019 23:45:41 +0300 Subject: [Lazarus] What happened to LazWiki? Message-ID: <01312d31-f5fb-923a-c6fe-962234356e0e@gmail.com> For some time, I receive the message “The wiki is currently in read-only mode. Problems with the file system ... "when I try to edit the page. Does anyone have information about what happened? WBR, ZoltanLeo From michael at freepascal.org Thu Jun 6 23:16:50 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Thu, 6 Jun 2019 23:16:50 +0200 (CEST) Subject: [Lazarus] What happened to LazWiki? In-Reply-To: <01312d31-f5fb-923a-c6fe-962234356e0e@gmail.com> References: <01312d31-f5fb-923a-c6fe-962234356e0e@gmail.com> Message-ID: On Thu, 6 Jun 2019, leyba bronstain via lazarus wrote: > For some time, I receive the message “The wiki is currently in read-only > mode. Problems with the file system ... "when I try to edit the page. > Does anyone have information about what happened? The filesystem of the virtual machine was damaged. We're in the process of moving the wiki to another machine. Michael. From leobronstain at gmail.com Fri Jun 7 00:49:07 2019 From: leobronstain at gmail.com (leyba bronstain) Date: Fri, 7 Jun 2019 01:49:07 +0300 Subject: [Lazarus] What happened to LazWiki? In-Reply-To: References: <01312d31-f5fb-923a-c6fe-962234356e0e@gmail.com> Message-ID: <373ac367-6a64-3410-32c9-44b70015150e@gmail.com> OK. Thank U. 07.06.2019 0:16, Michael Van Canneyt via lazarus пишет: > > > On Thu, 6 Jun 2019, leyba bronstain via lazarus wrote: > >> For some time, I receive the message “The wiki is currently in >> read-only mode. Problems with the file system ... "when I try to edit >> the page. Does anyone have information about what happened? > > The filesystem of the virtual machine was damaged. We're in the > process of > moving the wiki to another machine. > > Michael. > From lazarus at mfriebe.de Fri Jun 7 14:26:42 2019 From: lazarus at mfriebe.de (Martin Frb) Date: Fri, 7 Jun 2019 14:26:42 +0200 Subject: [Lazarus] fpdebug apps In-Reply-To: References: Message-ID: <3b24abc5-12c7-3da0-dd28-8601f3ea407f@mfriebe.de> On 06/06/2019 22:20, Martin Frb via lazarus wrote: > On 06/06/2019 16:59, Dimitrios Chr. Ioannidis via lazarus wrote: >> Hi, >> >>   if I remember correctly, there was a standalone fpdebug >> application. Am I correct ? Because I could not build any project >> from the fpdebug/app dir. >> >> PS: I used a fresh svn update for fpc trunk and Lazarus trunk. > > Indeed, they are currently broken. > > I did fix some of the compile errors (Those I had previously fixed in > fpdserver, so I knew how to fix them). > But there are some more. Ok it compiles now fpd.exe yourapp.exe r b unit1.pas:33 c works. But there is tons of internal output.... IMHO Not very useful as it is. From marc at dommelstein.nl Fri Jun 7 15:12:58 2019 From: marc at dommelstein.nl (Marc Weustink) Date: Fri, 7 Jun 2019 15:12:58 +0200 Subject: [Lazarus] fpdebug apps In-Reply-To: <3b24abc5-12c7-3da0-dd28-8601f3ea407f@mfriebe.de> References: <3b24abc5-12c7-3da0-dd28-8601f3ea407f@mfriebe.de> Message-ID: <6369e37f-05cb-b92b-97c9-6d7774826a37@dommelstein.nl> Martin Frb via lazarus wrote: > On 06/06/2019 22:20, Martin Frb via lazarus wrote: >> On 06/06/2019 16:59, Dimitrios Chr. Ioannidis via lazarus wrote: >>> Hi, >>> >>>   if I remember correctly, there was a standalone fpdebug >>> application. Am I correct ? Because I could not build any project >>> from the fpdebug/app dir. >>> >>> PS: I used a fresh svn update for fpc trunk and Lazarus trunk. >> >> Indeed, they are currently broken. >> >> I did fix some of the compile errors (Those I had previously fixed in >> fpdserver, so I knew how to fix them). >> But there are some more. > > Ok it compiles now > > fpd.exe yourapp.exe > r > b unit1.pas:33 > c > > works. > But there is tons of internal output.... > IMHO Not very useful as it is. > :-) I created fpd only to have a simple project to debug the debugger Marc From d.ioannidis at nephelae.eu Fri Jun 7 15:17:37 2019 From: d.ioannidis at nephelae.eu (Dimitrios Chr. Ioannidis) Date: Fri, 07 Jun 2019 16:17:37 +0300 Subject: [Lazarus] fpdebug apps In-Reply-To: <3b24abc5-12c7-3da0-dd28-8601f3ea407f@mfriebe.de> References: <3b24abc5-12c7-3da0-dd28-8601f3ea407f@mfriebe.de> Message-ID: <613cb73a04e67ef136cd4348ed27a7dd@nephelae.eu> Hi Martin, On 2019-06-07 15:26, Martin Frb via lazarus wrote: < snip > > Ok it compiles now > > fpd.exe yourapp.exe > r > b unit1.pas:33 > c > > works. Thank you very much. regards, -- Dimitrios Chr. Ioannidis From d.ioannidis at nephelae.eu Fri Jun 7 15:20:41 2019 From: d.ioannidis at nephelae.eu (Dimitrios Chr. Ioannidis) Date: Fri, 07 Jun 2019 16:20:41 +0300 Subject: [Lazarus] fpdebug apps In-Reply-To: <6369e37f-05cb-b92b-97c9-6d7774826a37@dommelstein.nl> References: <3b24abc5-12c7-3da0-dd28-8601f3ea407f@mfriebe.de> <6369e37f-05cb-b92b-97c9-6d7774826a37@dommelstein.nl> Message-ID: On 2019-06-07 16:12, Marc Weustink via lazarus wrote: > Martin Frb via lazarus wrote: < snip > >> IMHO Not very useful as it is. >> > > :-) > > I created fpd only to have a simple project to debug the debugger I'm planning to use it as an example / temlate. I think that it will help me on my goal to write the mEDBG prototcol. It's easier for me to debug a project in Lazarus than a component for Lazarus in Lazarus .... ;) regards, -- Dimitrios Chr. Ioannidis From lazarus at mfriebe.de Fri Jun 7 16:12:03 2019 From: lazarus at mfriebe.de (Martin Frb) Date: Fri, 7 Jun 2019 16:12:03 +0200 Subject: [Lazarus] fpdebug apps In-Reply-To: References: <3b24abc5-12c7-3da0-dd28-8601f3ea407f@mfriebe.de> <6369e37f-05cb-b92b-97c9-6d7774826a37@dommelstein.nl> Message-ID: <091cb1e0-b0e8-2671-31c5-f46a2c6611f6@mfriebe.de> On 07/06/2019 15:20, Dimitrios Chr. Ioannidis via lazarus wrote: > >   I'm planning to use it as an example / temlate. > >   I think that it will help me on my goal to write the mEDBG prototcol. > >   It's easier for me to debug a project in Lazarus than a component > for Lazarus in Lazarus .... ;) > There also is an fpdebug server. But it may not work at all.... Debugging a project is always easier, that debugging the whole IDE. There is an entire framework for debugging the debuggers. So if you write any fpdebug related code, look at the testcase in lazdebuggers/lazDebuggerFp/test From tobiasgiesen at gmail.com Sun Jun 9 14:59:04 2019 From: tobiasgiesen at gmail.com (tobiasgiesen at gmail.com) Date: Sun, 09 Jun 2019 14:59:04 +0200 Subject: [Lazarus] Modal Window Crashes on Mac OS X 10.15 Beta (Catalina) Message-ID: <20190609145903.513A.B7062D51@tgtools.de> Hello, I have been very happy with how my app can be compiled for 64-bit Cocoa so far, but on Mac OS Catalina Beta it crashes. Even the most minimal application with only two forms crashes if you try to open the second form as a modal dialog. It happens with both Lazarus 2.0.2 and trunk. The error description in the crash report is quite detailed but I have no idea what needs to be done: *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Cannot update for observer for the key path "mainWindow.representedURL" from , most likely because the value for the key "mainWindow" has changed without an appropriate KVO notification being sent. Check the KVO-compliance of the TCocoaApplication class.' Performing @selector(actionButtonClick:) from sender TCocoaButton 0x100b127e0 abort() called terminating with uncaught exception of type NSException It happens inside the call to beginModalSessionForWindow in TCocoaWidgetSet.StartModal. What can be done? Cheers, Tobias From zoe at scootersoftware.com Sun Jun 9 17:31:13 2019 From: zoe at scootersoftware.com (Zoe Peterson) Date: Sun, 09 Jun 2019 10:31:13 -0500 Subject: [Lazarus] Modal Window Crashes on Mac OS X 10.15 Beta (Catalina) In-Reply-To: <20190609145903.513A.B7062D51@tgtools.de> References: <20190609145903.513A.B7062D51@tgtools.de> Message-ID: > I have been very happy with how my app can be compiled for 64-bit Cocoa > so far, but on Mac OS Catalina Beta it crashes. Even the most minimal > application with only two forms crashes if you try to open the second > form as a modal dialog. It happens with both Lazarus 2.0.2 and trunk. We have a fix for that. I'll make sure it's submitted to the bug tracker on Monday. -- Zoë Peterson Scooter Software From tobiasgiesen at gmail.com Mon Jun 10 00:15:34 2019 From: tobiasgiesen at gmail.com (tobiasgiesen at gmail.com) Date: Mon, 10 Jun 2019 00:15:34 +0200 Subject: [Lazarus] Modal Window Crashes on Mac OS X 10.15 Beta (Catalina) In-Reply-To: References: <20190609145903.513A.B7062D51@tgtools.de> Message-ID: <20190610001533.A33A.B7062D51@tgtools.de> Hello, wow, many thanks, I would be infinitely grateful! Cheers, Tobias ---- On Sun, 09 Jun 2019 10:31:13 -0500 "Zoe Peterson" wrote: > > I have been very happy with how my app can be compiled for 64-bit > Cocoa > > so far, but on Mac OS Catalina Beta it crashes. Even the most > minimal > > application with only two forms crashes if you try to open the second > > form as a modal dialog. It happens with both Lazarus 2.0.2 and trunk. > > We have a fix for that. I'll make sure it's submitted to the bug tracker on > Monday. > > -- > Zoë Peterson > Scooter Software > Kind Regards, Tobias Giesen Super Flexible Software GmbH & Co. KG Buddenstr. 29-31 48143 Münster, Germany www.superflexible.com www.tgtools.com ----------------------------------------------------------- Registered at register court Münster as HRA 9716 Liability / general partner: TGTools GmbH Registered at register court Münster as HRB 17763 Directors: Tobias Giesen and Claudia Giesen From lazarus at mfriebe.de Mon Jun 10 01:05:25 2019 From: lazarus at mfriebe.de (Martin Frb) Date: Mon, 10 Jun 2019 01:05:25 +0200 Subject: [Lazarus] avr, fpdebug and dwarf In-Reply-To: <2200c019-3aa0-4f0b-a805-00387428ff06@nephelae.eu> References: <2200c019-3aa0-4f0b-a805-00387428ff06@nephelae.eu> Message-ID: On 09/06/2019 18:16, Dimitrios Chr. Ioannidis wrote: > Hi, > >   I managed to use an official AVR debugger ( AVR Dragon ) with an > official gdb-bridge ( Atmel Studio's atbackend.exe ) and I can start a > debugging session from Lazarus, using a avr-gdb 8.3 ( or the official > gdb from the Microchip (Atmel) AVR Toolchain ). > >   But what am I seeing ( see attached screenshot ) makes me to believe > that fpdebug ( either dwarf 2 or dwarf 3 the results is the same ) > doesn't know ( needs to know ? ... ) how to interpret the avr platform > /architecture . Am I correct in my assumption ? > >   What is your opinion ? Yes, fpdebug currently only knows intel. I assume, this is a linux based platform? components\fpdebug\fpdbglinuxclasses.pas TDbgLinuxThread.ReadThreadState And anything that then accesses the registers. Registers need to be stored with the correct dwarf index. The index is used when reading any register based data (including any data relative to the stack / i.e. local var) Note, that currently access to StackPointer/Base and InstructionPointer are hardcoded in other units too (using either the intel name, or the dwarf reg num for intel) So that needs to be fixed... The disassemble currently only does intel too. Not sure if stepping relies on this. (i.e. identifying "call" instructions) Stepping needs to be reworked anyway. From lazarus at mfriebe.de Mon Jun 10 01:13:04 2019 From: lazarus at mfriebe.de (Martin Frb) Date: Mon, 10 Jun 2019 01:13:04 +0200 Subject: [Lazarus] avr, fpdebug and dwarf In-Reply-To: References: <2200c019-3aa0-4f0b-a805-00387428ff06@nephelae.eu> Message-ID: <83add28e-3674-5d61-ffc7-0320a31c4501@mfriebe.de> On 10/06/2019 01:05, Martin Frb via lazarus wrote: > > > Note, that currently access to StackPointer/Base and > InstructionPointer are hardcoded in other units too (using either the > intel name, or the dwarf reg num for intel) > So that needs to be fixed... I.e. you find code like         if AController.CurrentProcess.Mode=dm32 then           Reg := RegList.FindRegisterByDwarfIndex(8)         else           Reg := RegList.FindRegisterByDwarfIndex(16); (evaluating the stack) RegList should have methods: .GetStackBase .GetInstructionPointer And reading the stack, may have to be moved to OS/CPU specific classes, if stack-frame layout may differ. From denisgolovan at yandex.ru Mon Jun 10 11:50:49 2019 From: denisgolovan at yandex.ru (denisgolovan) Date: Mon, 10 Jun 2019 12:50:49 +0300 Subject: [Lazarus] .lrs not created? Message-ID: <503911560160249@myt2-dc4bba9bb23c.qloud-c.yandex.net> Hi all I am getting some strange behaviour in latest trunk Lazarus (rev. 61340) Namely, Lazarus does not create .lrs files for files on form changing/saving. It's new test project for dynamic library. This results in run-time errors like: Form resource TfrmMain not found. For resourceless forms CreateNew constructor must be used. See the global variable RequireDerivedFormResource. I found some option in Project options-Misc-Resource type of project. It was "FPC resources", I've changed it to "Lazarus resources (.lrs)", but it does not help. Any thoughts? -- Regards, Denis Golovan From luca at wetron.es Mon Jun 10 12:40:07 2019 From: luca at wetron.es (Luca Olivetti) Date: Mon, 10 Jun 2019 12:40:07 +0200 Subject: [Lazarus] really strange messagedlg hang In-Reply-To: <05a2c505-8cbe-5fba-8374-4ab6c42318e6@wetron.es> References: <0ae3847a-5bb0-6dc9-d131-c81d699c7b97@wetron.es> <05a2c505-8cbe-5fba-8374-4ab6c42318e6@wetron.es> Message-ID: <90a0a142-9452-42f2-d8bd-778e1f7b8e62@wetron.es> El 1/6/19 a les 12:18, Luca Olivetti via lazarus ha escrit: > El 31/5/19 a les 17:16, Luca Olivetti via lazarus ha escrit: > >> If I recompile it with lazarus 2.0.2[*]/fpc 3.2.beta (cannot use 3.0.2 >> due to the above mentioned thread issue) the problem disappears. > > It also disappears (with lazarus 1.6.4/fpc 2.6.4) if I turn off the > option "use manifest file to enable themes" > >> Any idea? > > The question still stands. Maybe a bug with themes in lazarus 1.6.4? Nobody? Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From lazarus at mfriebe.de Mon Jun 10 12:50:25 2019 From: lazarus at mfriebe.de (Martin Frb) Date: Mon, 10 Jun 2019 12:50:25 +0200 Subject: [Lazarus] really strange messagedlg hang In-Reply-To: <90a0a142-9452-42f2-d8bd-778e1f7b8e62@wetron.es> References: <0ae3847a-5bb0-6dc9-d131-c81d699c7b97@wetron.es> <05a2c505-8cbe-5fba-8374-4ab6c42318e6@wetron.es> <90a0a142-9452-42f2-d8bd-778e1f7b8e62@wetron.es> Message-ID: <4e485920-ee16-1add-6c94-12e31232c80b@mfriebe.de> On 10/06/2019 12:40, Luca Olivetti via lazarus wrote: > El 1/6/19 a les 12:18, Luca Olivetti via lazarus ha escrit: >> El 31/5/19 a les 17:16, Luca Olivetti via lazarus ha escrit: >> >>> If I recompile it with lazarus 2.0.2[*]/fpc 3.2.beta (cannot use >>> 3.0.2 due to the above mentioned thread issue) the problem disappears. >> >> It also disappears (with lazarus 1.6.4/fpc 2.6.4) if I turn off the >> option "use manifest file to enable themes" >> >>> Any idea? >> >> The question still stands. Maybe a bug with themes in lazarus 1.6.4? > > Nobody? There were several issues in fpc thread sync related code. Not sure if any of those may be related to your issue. https://bugs.freepascal.org/view.php?id=35027 https://bugs.freepascal.org/view.php?id=35028 https://bugs.freepascal.org/view.php?id=34640 From luca at wetron.es Mon Jun 10 13:03:25 2019 From: luca at wetron.es (Luca Olivetti) Date: Mon, 10 Jun 2019 13:03:25 +0200 Subject: [Lazarus] really strange messagedlg hang In-Reply-To: <4e485920-ee16-1add-6c94-12e31232c80b@mfriebe.de> References: <0ae3847a-5bb0-6dc9-d131-c81d699c7b97@wetron.es> <05a2c505-8cbe-5fba-8374-4ab6c42318e6@wetron.es> <90a0a142-9452-42f2-d8bd-778e1f7b8e62@wetron.es> <4e485920-ee16-1add-6c94-12e31232c80b@mfriebe.de> Message-ID: <5ef429d5-4204-51bc-c585-7066d4afe39d@wetron.es> El 10/6/19 a les 12:50, Martin Frb via lazarus ha escrit: > On 10/06/2019 12:40, Luca Olivetti via lazarus wrote: >> El 1/6/19 a les 12:18, Luca Olivetti via lazarus ha escrit: >>> El 31/5/19 a les 17:16, Luca Olivetti via lazarus ha escrit: >>> >>>> If I recompile it with lazarus 2.0.2[*]/fpc 3.2.beta (cannot use >>>> 3.0.2 due to the above mentioned thread issue) the problem disappears. >>> >>> It also disappears (with lazarus 1.6.4/fpc 2.6.4) if I turn off the >>> option "use manifest file to enable themes" >>> >>>> Any idea? >>> >>> The question still stands. Maybe a bug with themes in lazarus 1.6.4? >> >> Nobody? > > There were several issues in fpc thread sync related code. Not sure if > any of those may be related to your issue. > > https://bugs.freepascal.org/view.php?id=35027 > https://bugs.freepascal.org/view.php?id=35028 > https://bugs.freepascal.org/view.php?id=34640 No, I was not referring to the thread problem I had with 3.0.4. I *never* had thread problems with 2.6.4 and (crossing fingers) my problems seems to be fixed in 3.2.x. The problem was messagedlg hanging for a minute or more with lazarus 1.6.4/fpc 2.6.4 under win32 and manifest file enabled. Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From skalogryz.lists at gmail.com Mon Jun 10 22:59:30 2019 From: skalogryz.lists at gmail.com (Dmitry Boyarintsev) Date: Mon, 10 Jun 2019 16:59:30 -0400 Subject: [Lazarus] Modal Window Crashes on Mac OS X 10.15 Beta (Catalina) In-Reply-To: References: <20190609145903.513A.B7062D51@tgtools.de> Message-ID: On Sun, Jun 9, 2019 at 11:31 AM Zoe Peterson via lazarus < lazarus at lists.lazarus-ide.org> wrote: > I'll make sure it's submitted to the bug tracker on Monday. > Follow up! :) thanks, Dmitry -------------- next part -------------- An HTML attachment was scrubbed... URL: From david at scootersoftware.com Tue Jun 11 00:18:49 2019 From: david at scootersoftware.com (David Jenkins) Date: Mon, 10 Jun 2019 17:18:49 -0500 Subject: [Lazarus] Modal Window Crashes on Mac OS X 10.15 Beta (Catalina) In-Reply-To: References: <20190609145903.513A.B7062D51@tgtools.de> Message-ID: In now.  Mantis 35702 On 6/10/19 3:59 PM, Dmitry Boyarintsev via lazarus wrote: > On Sun, Jun 9, 2019 at 11:31 AM Zoe Peterson via lazarus > > > wrote: > > I'll make sure it's submitted to the bug tracker on Monday. > > > Follow up! :) > > thanks, > Dmitry > -------------- next part -------------- An HTML attachment was scrubbed... URL: From skalogryz.lists at gmail.com Tue Jun 11 01:56:15 2019 From: skalogryz.lists at gmail.com (Dmitry Boyarintsev) Date: Mon, 10 Jun 2019 19:56:15 -0400 Subject: [Lazarus] Modal Window Crashes on Mac OS X 10.15 Beta (Catalina) In-Reply-To: References: <20190609145903.513A.B7062D51@tgtools.de> Message-ID: On Mon, Jun 10, 2019 at 6:18 PM David Jenkins via lazarus < lazarus at lists.lazarus-ide.org> wrote: > In now. Mantis 35702 > While the research seems to be quite thorough, the following statement: "Error is caused because Cocoa currently doesn't run through base level NSApplication.run and thus appropriate ._isrunning flag is not set " contradicts Apple's documentation ( https://developer.apple.com/documentation/appkit/nsapplication?language=objc ) "...Methods to Override ... Override run if you want the app to manage the main event loop differently than it does by default. (This a critical and complex task, however, that you should only attempt with good reason.)" If the first statement is true, then run cannot and should not be overriden at all. thanks, Dmitry -------------- next part -------------- An HTML attachment was scrubbed... URL: From skalogryz.lists at gmail.com Tue Jun 11 02:00:03 2019 From: skalogryz.lists at gmail.com (Dmitry Boyarintsev) Date: Mon, 10 Jun 2019 20:00:03 -0400 Subject: [Lazarus] Modal Window Crashes on Mac OS X 10.15 Beta (Catalina) In-Reply-To: References: <20190609145903.513A.B7062D51@tgtools.de> Message-ID: I'd actually encourage Tobias to try the patch at #35702 and see if it fixes the problem. thanks, Dmitry -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobiasgiesen at gmail.com Tue Jun 11 11:49:06 2019 From: tobiasgiesen at gmail.com (tobiasgiesen at gmail.com) Date: Tue, 11 Jun 2019 11:49:06 +0200 Subject: [Lazarus] Modal Window Crashes on Mac OS X 10.15 Beta (Catalina) In-Reply-To: References: Message-ID: <20190611114905.6B3D.B7062D51@tgtools.de> Hello, the fix works fine! It does make sense, and maybe Apple changed something in Catalina and they still need to update the documentation. The way aloop() is called now does look like a quick workaround, maybe it is possible to find a better looking way to run it. Maybe there is a different callback or method override where this can be called. But since it works fine, I am quite happy already! And it still runs on Yosemite too. Many thanks. Kind Regards, Tobias Giesen Super Flexible Software GmbH & Co. KG ---- On Mon, 10 Jun 2019 20:00:03 -0400 Dmitry Boyarintsev via lazarus wrote: > I'd actually encourage Tobias to try the patch at #35702 and see if it > fixes the problem. > > thanks, > Dmitry Kind Regards, Tobias Giesen Super Flexible Software GmbH & Co. KG Buddenstr. 29-31 48143 Münster, Germany www.superflexible.com www.tgtools.com ----------------------------------------------------------- Registered at register court Münster as HRA 9716 Liability / general partner: TGTools GmbH Registered at register court Münster as HRB 17763 Directors: Tobias Giesen and Claudia Giesen From skalogryz.lists at gmail.com Tue Jun 11 15:13:54 2019 From: skalogryz.lists at gmail.com (Dmitry Boyarintsev) Date: Tue, 11 Jun 2019 09:13:54 -0400 Subject: [Lazarus] Modal Window Crashes on Mac OS X 10.15 Beta (Catalina) In-Reply-To: <20190611114905.6B3D.B7062D51@tgtools.de> References: <20190611114905.6B3D.B7062D51@tgtools.de> Message-ID: On Tue, Jun 11, 2019 at 5:49 AM Tobias Giesen via lazarus < lazarus at lists.lazarus-ide.org> wrote: > the fix works fine! It does make sense, and maybe Apple changed > something in Catalina and they still need to update the documentation. > > The way aloop() is called now does look like a quick workaround, maybe > it is possible to find a better looking way to run it. Maybe there is a > different callback or method override where this can be called. But > since it works fine, I am quite happy already! > I wonder if it's related to the official support of UIKit. UIApplication doesn't suggest overriding of events handling (it only allows to "preview" an event before it has been executed by UIKit). (nothing mentioned in release notes though: https://developer.apple.com/documentation/macos_release_notes/macos_10_15_beta_release_notes ) The patch has been applied. I left the door open for the original implementation (with run method override). By the way, did anyone try 32-bit Carbon app (i.e. Lazarus)? :) thanks, Dmitry -------------- next part -------------- An HTML attachment was scrubbed... URL: From david at scootersoftware.com Tue Jun 11 16:05:58 2019 From: david at scootersoftware.com (David Jenkins) Date: Tue, 11 Jun 2019 09:05:58 -0500 Subject: [Lazarus] Modal Window Crashes on Mac OS X 10.15 Beta (Catalina) In-Reply-To: References: <20190609145903.513A.B7062D51@tgtools.de> Message-ID: 'Override run' doesn't necessarily mean replace all of it. Inherited can be called from the override.  And I'd agree with the addendum "(This a critical and complex task, however, that you should only attempt with good reason.)". I looked at the assembly for NSApplication.run, there are a lot of things being called and set before the call to nextEventMatching...   The .isRunning variable being one of them - which is read only and can't be set.  It can be overridden (and is one of the suggested overrides) but unfortunately there are times, in other parts of the code, that they look directly at the ._running variable where the value of .isRunning is stored instead of calling .isRunning (look at NSApplication._setMainWindow).  Which sets up a mismatch between what an overridden .isRunning method would return and what ._running is set to. Obviously the overrides have worked fine so far.  And I agree with Tobias that it is code changes in the 10.15 beta that has really caused this to not work.  Setting up NSFrontmostDocumentWindowObserver is new to 10.15 and that is where the fault has happened.  It is beta software and bugs will be there.  Or functionality that will be removed before release. Nevertheless I'd suggest a couple of cautionary points with regards to overriding run: 1) I have found Apple Documentation to be overly sparse at points and that it doesn't keep up well with new code.  So reading that it you can override .run in the Documentation doesn't immediately suggest to me that it is a good idea or should be done. 2) Take the "(This a critical and complex task, however, that you should only attempt with good reason.)" seriously and call inherited or look at inherited (lldb/assembly) and try to implement most of what happens there.  Notice that the initial override of run did cause a bug in Lazarus that had to be resolved by overriding .isRunning. I'm fine with a more elegant way to call aloop.  The advantage of what we have done is that it is the very first thing that happens when NSApplication.run calls nextEventMatching - no if ands or buts.  I had originally kicked it off by calling postEvent(event, Yes) (put event at top of queue).  This does not guarantee that nothing else happens before we get aloop running.  It would be nice to not have the to check 'isrun' each time through nextEventMatching. David On 6/10/19 6:56 PM, Dmitry Boyarintsev via lazarus wrote: > On Mon, Jun 10, 2019 at 6:18 PM David Jenkins via lazarus > > > wrote: > > In now.  Mantis 35702 > > While the research seems to be quite thorough, the following statement: > "Error is caused because Cocoa currently doesn't run through base > level NSApplication.run and thus appropriate ._isrunning flag is not > set " > > contradicts Apple's documentation > (https://developer.apple.com/documentation/appkit/nsapplication?language=objc) > > "...Methods to Override > ... > Override run if you want the app to manage the main event loop > differently than it does by default. (This a critical and complex > task, however, that you should only attempt with good reason.)" > > If the first statement is true, then run cannot and should not be > overriden at all. > > thanks, > Dmitry > -------------- next part -------------- An HTML attachment was scrubbed... URL: From skalogryz.lists at gmail.com Tue Jun 11 16:19:35 2019 From: skalogryz.lists at gmail.com (Dmitry Boyarintsev) Date: Tue, 11 Jun 2019 10:19:35 -0400 Subject: [Lazarus] Modal Window Crashes on Mac OS X 10.15 Beta (Catalina) In-Reply-To: References: <20190609145903.513A.B7062D51@tgtools.de> Message-ID: On Tue, Jun 11, 2019 at 10:06 AM David Jenkins via lazarus < lazarus at lists.lazarus-ide.org> wrote: > I looked at the assembly for NSApplication.run, there are a lot of things > being called and set before the call to nextEventMatching... The > .isRunning variable being one of them - which is read only and can't be > set. It can be overridden (and is one of the suggested overrides) but > unfortunately there are times, in other parts of the code, that they look > directly at the ._running variable where the value of .isRunning is stored > instead of calling .isRunning (look at NSApplication._setMainWindow). > Which sets up a mismatch between what an overridden .isRunning method would > return and what ._running is set to. > Let's back-up a little bit. Can we actually try to set the value for the instance variable? 1) it's absolutely legal in Objective-C terms (object_getInstanceVariable, object_setInstanceVariable). 2) its' absolutely legal in KVC term. (I can presume that KVC is pretty much based on top of objc-run time. And this is how the entire Swift<->ObjC binding works) Can anyone try and modify TCocoaApplication.run to look like this. (If you're using trunk, you'll need to have {$define COCOALOOPOVERRIDE} defines in cocoadefines.inc} procedure TCocoaApplication.run; begin self.setValue_forKey(NSNumber.numberWithBool(true),NSSTR('_running')); // setting instance variable through KVC isrun:=true; aloop(); end; -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobiasgiesen at gmail.com Tue Jun 11 16:21:41 2019 From: tobiasgiesen at gmail.com (Tobias Giesen) Date: Tue, 11 Jun 2019 16:21:41 +0200 Subject: [Lazarus] Modal Window Crashes on Mac OS X 10.15 Beta (Catalina) In-Reply-To: References: <20190611114905.6B3D.B7062D51@tgtools.de> Message-ID: yes I tried 32 Bit apps on Catalina and they cannot be run ----- Please excuse the shortness of this mail which was sent from my mobile phone. If necessary, I will send more information later. Cheers, Tobias Giesen > Am 11.06.2019 um 15:13 schrieb Dmitry Boyarintsev via lazarus : > >> On Tue, Jun 11, 2019 at 5:49 AM Tobias Giesen via lazarus wrote: > >> the fix works fine! It does make sense, and maybe Apple changed >> something in Catalina and they still need to update the documentation. >> >> The way aloop() is called now does look like a quick workaround, maybe >> it is possible to find a better looking way to run it. Maybe there is a >> different callback or method override where this can be called. But >> since it works fine, I am quite happy already! > > I wonder if it's related to the official support of UIKit. > UIApplication doesn't suggest overriding of events handling (it only allows to "preview" an event before it has been executed by UIKit). > (nothing mentioned in release notes though: https://developer.apple.com/documentation/macos_release_notes/macos_10_15_beta_release_notes) > > The patch has been applied. I left the door open for the original implementation (with run method override). > > By the way, did anyone try 32-bit Carbon app (i.e. Lazarus)? :) > > thanks, > Dmitry > -- > _______________________________________________ > lazarus mailing list > lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobiasgiesen at gmail.com Tue Jun 11 16:30:15 2019 From: tobiasgiesen at gmail.com (Tobias Giesen) Date: Tue, 11 Jun 2019 16:30:15 +0200 Subject: [Lazarus] Modal Window Crashes on Mac OS X 10.15 Beta (Catalina) In-Reply-To: References: <20190609145903.513A.B7062D51@tgtools.de> Message-ID: I will try it in a few hours ----- Please excuse the shortness of this mail which was sent from my mobile phone. If necessary, I will send more information later. Cheers, Tobias Giesen > Am 11.06.2019 um 16:19 schrieb Dmitry Boyarintsev via lazarus : > >> On Tue, Jun 11, 2019 at 10:06 AM David Jenkins via lazarus wrote: > >> I looked at the assembly for NSApplication.run, there are a lot of things being called and set before the call to nextEventMatching... The .isRunning variable being one of them - which is read only and can't be set. It can be overridden (and is one of the suggested overrides) but unfortunately there are times, in other parts of the code, that they look directly at the ._running variable where the value of .isRunning is stored instead of calling .isRunning (look at NSApplication._setMainWindow). Which sets up a mismatch between what an overridden .isRunning method would return and what ._running is set to. > > Let's back-up a little bit. > > Can we actually try to set the value for the instance variable? > 1) it's absolutely legal in Objective-C terms (object_getInstanceVariable, object_setInstanceVariable). > 2) its' absolutely legal in KVC term. (I can presume that KVC is pretty much based on top of objc-run time. And this is how the entire Swift<->ObjC binding works) > > Can anyone try and modify TCocoaApplication.run to look like this. (If you're using trunk, you'll need to have {$define COCOALOOPOVERRIDE} defines in cocoadefines.inc} > > procedure TCocoaApplication.run; > begin > self.setValue_forKey(NSNumber.numberWithBool(true),NSSTR('_running')); // setting instance variable through KVC > isrun:=true; > aloop(); > end; > -- > _______________________________________________ > lazarus mailing list > lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: From zoe at scootersoftware.com Tue Jun 11 16:43:15 2019 From: zoe at scootersoftware.com (=?UTF-8?Q?Zo=c3=ab_Peterson?=) Date: Tue, 11 Jun 2019 09:43:15 -0500 Subject: [Lazarus] Modal Window Crashes on Mac OS X 10.15 Beta (Catalina) In-Reply-To: References: <20190609145903.513A.B7062D51@tgtools.de> Message-ID: <85394fc6-4154-7baa-8d77-01d521d36975@scootersoftware.com> On 6/11/2019 9:19 AM, Dmitry Boyarintsev via lazarus wrote: > Can we actually try to set the value for the instance variable? > > Can anyone try and modify TCocoaApplication.run to look like this. (If > you're using trunk, you'll need to have {$define COCOALOOPOVERRIDE} > defines in cocoadefines.inc} David did the research on this one, but IMHO, this is a bad idea. As he said, the inherited run does more than just set _running before it starts calling nextEventMatchingMask; that's is just the bit that causes an obvious crash. It's also poking around the implementation rather than relying on the public API, so it will be more likely to break again going forward. If it's a problem to check isRunning every time through nextEventMatchingMask, and alternative with the same behavior would be to swizzle in the runloop variant before calling inherited run and switching it back once we get into it. -- Zoë Peterson Scooter Software From skalogryz.lists at gmail.com Wed Jun 12 06:56:47 2019 From: skalogryz.lists at gmail.com (Dmitry Boyarintsev) Date: Wed, 12 Jun 2019 00:56:47 -0400 Subject: [Lazarus] Modal Window Crashes on Mac OS X 10.15 Beta (Catalina) In-Reply-To: <85394fc6-4154-7baa-8d77-01d521d36975@scootersoftware.com> References: <20190609145903.513A.B7062D51@tgtools.de> <85394fc6-4154-7baa-8d77-01d521d36975@scootersoftware.com> Message-ID: On Tue, Jun 11, 2019 at 10:43 AM Zoë Peterson via lazarus < lazarus at lists.lazarus-ide.org> wrote: > David did the research on this one, but IMHO, this is a bad idea. As he > said, the inherited run does more than just set _running before it > starts calling nextEventMatchingMask; Yet Apple suggests that "run" method can be overridden. That's very true, that Apple can add much more into "run" method and it would be nice if we could use the code. Yes, overriding "run" has its own risk of not being future compatible. But I don't recall any flawless macOS update. On each new macOS version there were some "LCL incompatible" changes anyway. > that's is just the bit that causes an obvious crash. It's also poking > around the implementation rather > than relying on the public API, so it will be more likely to break again > going forward. > Public API is actually refers to methods, not instance names. Actually instance variable name are specifically should be named with underscore in them ( https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/KeyValueCoding/Compliant.html ) > If it's a problem to check isRunning every time through > nextEventMatchingMask, and alternative with the same behavior would be > to swizzle in the runloop variant before calling inherited run and > switching it back once we get into it. > Switching back? how is it possible? I don't really like the idea of hijacking the event loop for quite a simple reason. The nextEventMatchingMask can be called for whatever event, and hijacking can violate the conditions of the call. (for example, if the method is called with a timeout, and LCL hijacks the loop. Then it never returns withing specified time). We cannot be sure at what particular event, the hijacking would occur. Today, there was a bug report, about crash in the hijacking approach https://forum.lazarus.freepascal.org/index.php/topic,44930.msg323420.html#msg323420 The application written caused nextEventMatchMask to be called even prior to Application.Init. So eventually the method is as risky as overriding "run", and not a good design. (for example: NSApplication might send a certain event to NSWindow. Until the event has been processed it would leave some internal variables uninitialized as well) thanks, Dmitry -------------- next part -------------- An HTML attachment was scrubbed... URL: From skalogryz.lists at gmail.com Wed Jun 12 07:02:39 2019 From: skalogryz.lists at gmail.com (Dmitry Boyarintsev) Date: Wed, 12 Jun 2019 01:02:39 -0400 Subject: [Lazarus] Modal Window Crashes on Mac OS X 10.15 Beta (Catalina) In-Reply-To: References: <20190609145903.513A.B7062D51@tgtools.de> <85394fc6-4154-7baa-8d77-01d521d36975@scootersoftware.com> Message-ID: Btw, I'd prefer to keep COCOALOOPOVERRIDE define in the source code. As neither approach is 100% clean, we'll pretty much want to have an option to switch between one another. The cleanest way however - is to modify LCL itself! So there would be no need to call a "runloop" procedure (thus no need to either hijack the event loop and/or override run) Obviously, on the condition that the widgetset CAN handle Pascal exceptions in LCL friendly manner. thanks, Dmitry On Wed, Jun 12, 2019 at 12:56 AM Dmitry Boyarintsev < skalogryz.lists at gmail.com> wrote: > On Tue, Jun 11, 2019 at 10:43 AM Zoë Peterson via lazarus < > lazarus at lists.lazarus-ide.org> wrote: > >> David did the research on this one, but IMHO, this is a bad idea. As he >> said, the inherited run does more than just set _running before it >> starts calling nextEventMatchingMask; > > Yet Apple suggests that "run" method can be overridden. > That's very true, that Apple can add much more into "run" method and it > would be nice if we could use the code. > Yes, overriding "run" has its own risk of not being future compatible. > But I don't recall any flawless macOS update. On each new macOS version > there were some "LCL incompatible" changes anyway. > > >> that's is just the bit that causes an obvious crash. It's also poking >> around the implementation rather >> than relying on the public API, so it will be more likely to break again >> going forward. >> > Public API is actually refers to methods, not instance names. > Actually instance variable name are specifically should be named with > underscore in them > ( > https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/KeyValueCoding/Compliant.html > ) > > >> If it's a problem to check isRunning every time through >> nextEventMatchingMask, and alternative with the same behavior would be >> to swizzle in the runloop variant before calling inherited run and >> switching it back once we get into it. >> > Switching back? how is it possible? > > I don't really like the idea of hijacking the event loop for quite a > simple reason. > The nextEventMatchingMask can be called for whatever event, and hijacking > can violate the conditions of the call. > (for example, if the method is called with a timeout, and LCL hijacks the > loop. Then it never returns withing specified time). > > We cannot be sure at what particular event, the hijacking would occur. > Today, there was a bug report, about crash in the hijacking approach > > https://forum.lazarus.freepascal.org/index.php/topic,44930.msg323420.html#msg323420 > > The application written caused nextEventMatchMask to be called even prior > to Application.Init. > So eventually the method is as risky as overriding "run", and not a good > design. > > (for example: NSApplication might send a certain event to NSWindow. Until > the event has been processed it would leave some internal variables > uninitialized as well) > > thanks, > Dmitry > -------------- next part -------------- An HTML attachment was scrubbed... URL: From marc at dommelstein.nl Wed Jun 12 11:16:52 2019 From: marc at dommelstein.nl (Marc Weustink) Date: Wed, 12 Jun 2019 11:16:52 +0200 Subject: [Lazarus] Modal Window Crashes on Mac OS X 10.15 Beta (Catalina) In-Reply-To: References: <20190609145903.513A.B7062D51@tgtools.de> Message-ID: <934b1b34-2306-6a2f-55c6-48b934fd4ca9@dommelstein.nl> Dmitry Boyarintsev via lazarus wrote: > On Tue, Jun 11, 2019 at 10:06 AM David Jenkins via lazarus > > > wrote: > > I looked at the assembly for NSApplication.run, there are a lot of > things being called and set before the call to > nextEventMatching...   The .isRunning variable being one of them - > which is read only and can't be set.  It can be overridden (and is > one of the suggested overrides) but unfortunately there are times, > in other parts of the code, that they look directly at the ._running > variable where the value of .isRunning is stored instead of calling > .isRunning (look at NSApplication._setMainWindow).  Which sets up a > mismatch between what an overridden .isRunning method would return > and what ._running is set to. > > > Let's back-up a little bit. > > Can we actually try to set the value for the instance variable? > 1) it's absolutely legal in Objective-C terms > (object_getInstanceVariable, object_setInstanceVariable). > 2) its' absolutely legal in KVC term. (I can presume that KVC is pretty > much based on top of objc-run time. And this is how the entire > Swift<->ObjC binding works) BTW, did we report this issue (of the running variable not set) to Apple? Or is the below piece of code the way we should set it ourselves ? > Can anyone try and modify TCocoaApplication.run to look like this. (If > you're using trunk, you'll need to have {$define COCOALOOPOVERRIDE} > defines in cocoadefines.inc} > > procedure TCocoaApplication.run; > begin > > self.setValue_forKey(NSNumber.numberWithBool(true),NSSTR('_running')); > // setting instance variable through KVC >   isrun:=true; >   aloop(); > end; Marc From skalogryz.lists at gmail.com Wed Jun 12 14:39:24 2019 From: skalogryz.lists at gmail.com (Dmitry Boyarintsev) Date: Wed, 12 Jun 2019 08:39:24 -0400 Subject: [Lazarus] Modal Window Crashes on Mac OS X 10.15 Beta (Catalina) In-Reply-To: <934b1b34-2306-6a2f-55c6-48b934fd4ca9@dommelstein.nl> References: <20190609145903.513A.B7062D51@tgtools.de> <934b1b34-2306-6a2f-55c6-48b934fd4ca9@dommelstein.nl> Message-ID: On Wed, Jun 12, 2019 at 5:17 AM Marc Weustink via lazarus < lazarus at lists.lazarus-ide.org> wrote: > BTW, did we report this issue (of the running variable not set) to > Apple? Or is the below piece of code the way we should set it ourselves ? I didn't bug report the issue to Apple. The code provide can be called by LCL thanks, Dmitry -------------- next part -------------- An HTML attachment was scrubbed... URL: From zoe at scootersoftware.com Wed Jun 12 17:48:33 2019 From: zoe at scootersoftware.com (=?UTF-8?Q?Zo=c3=ab_Peterson?=) Date: Wed, 12 Jun 2019 10:48:33 -0500 Subject: [Lazarus] Modal Window Crashes on Mac OS X 10.15 Beta (Catalina) In-Reply-To: References: <20190609145903.513A.B7062D51@tgtools.de> <85394fc6-4154-7baa-8d77-01d521d36975@scootersoftware.com> Message-ID: <736d7b18-b236-dddd-b5a2-e797a2123248@scootersoftware.com> On 6/11/2019 11:56 PM, Dmitry Boyarintsev via lazarus wrote: > If it's a problem to check isRunning every time through > nextEventMatchingMask, and alternative with the same behavior would be > to swizzle in the runloop variant before calling inherited run and > switching it back once we get into it. > > Switching back? how is it possible? "Swizzling" is the name for replacing the Objective C method pointers using method_exchangeImplementations. It's not the same as overriding it. There's a writeup of it here: https://trinhngocthuyen.github.io/tech/method-swizzling-what-why-and-how/ So, rather than overriding nextEventMatchingMask directly, ours is called something like runLoop_nextEventMatchingMask. TCocoaWidgetSet.AppRun swaps the function pointers, soour version is only called after we get to that point, and when we get into that function, we swap them back and call the original implementation like normal. Our version only gets called once. > We cannot be sure at what particular event, the hijacking would occur. > Today, there was a bug report, about crash in the hijacking approach > https://forum.lazarus.freepascal.org/index.php/topic,44930.msg323420.html#msg323420 > > The application written caused nextEventMatchMask to be called even > prior to Application.Init. The above approach takes care of that, since our version is never used until we actually swap the method pointers. It removes the need to maintain an "isRun" variable too. -- Zoë Peterson Scooter Software From zoe at scootersoftware.com Wed Jun 12 17:50:46 2019 From: zoe at scootersoftware.com (=?UTF-8?Q?Zo=c3=ab_Peterson?=) Date: Wed, 12 Jun 2019 10:50:46 -0500 Subject: [Lazarus] Modal Window Crashes on Mac OS X 10.15 Beta (Catalina) In-Reply-To: <736d7b18-b236-dddd-b5a2-e797a2123248@scootersoftware.com> References: <20190609145903.513A.B7062D51@tgtools.de> <85394fc6-4154-7baa-8d77-01d521d36975@scootersoftware.com> <736d7b18-b236-dddd-b5a2-e797a2123248@scootersoftware.com> Message-ID: There is an alternate way to swizzle documented here, which the author claims has less side effects. I assume it would be possible to do this variant with Objective Pascal, but for a proof of concept it shouldn't be necessary: https://blog.newrelic.com/engineering/right-way-to-swizzle/ -- Zoë Peterson Scooter Software From skalogryz.lists at gmail.com Wed Jun 12 21:10:17 2019 From: skalogryz.lists at gmail.com (Dmitry Boyarintsev) Date: Wed, 12 Jun 2019 15:10:17 -0400 Subject: [Lazarus] Modal Window Crashes on Mac OS X 10.15 Beta (Catalina) In-Reply-To: <736d7b18-b236-dddd-b5a2-e797a2123248@scootersoftware.com> References: <20190609145903.513A.B7062D51@tgtools.de> <85394fc6-4154-7baa-8d77-01d521d36975@scootersoftware.com> <736d7b18-b236-dddd-b5a2-e797a2123248@scootersoftware.com> Message-ID: On Wed, Jun 12, 2019 at 11:48 AM Zoë Peterson via lazarus < lazarus at lists.lazarus-ide.org> wrote: > "Swizzling" is the name for replacing the Objective C method pointers > using method_exchangeImplementations. It's not the same as overriding it. > Quite an interesting technique. I'm quite confident it's being heavily used for Javascript. (I guess it's somewhat natural for reflective languages to use it) Though I'd consider going that low level as a last resort, rather than a permanent solution. thanks, Dmitry -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobiasgiesen at gmail.com Thu Jun 13 19:35:09 2019 From: tobiasgiesen at gmail.com (tobiasgiesen at gmail.com) Date: Thu, 13 Jun 2019 19:35:09 +0200 Subject: [Lazarus] Modal Window Crashes on Mac OS X 10.15 Beta (Catalina) In-Reply-To: References: <736d7b18-b236-dddd-b5a2-e797a2123248@scootersoftware.com> Message-ID: <20190613193508.A8B6.B7062D51@tgtools.de> Hello, I found that the code must be corrected like this to avoid an Access Violation if an event occurs before the aloop field is set. if Assigned(aloop) and not isrun then begin isrun:=true; Result:=nil; aloop(); terminate(nil); exit; end; Kind Regards, Tobias Giesen Super Flexible Software GmbH & Co. KG ---- On Wed, 12 Jun 2019 15:10:17 -0400 Dmitry Boyarintsev via lazarus wrote: > On Wed, Jun 12, 2019 at 11:48 AM Zoë Peterson via lazarus < > lazarus at lists.lazarus-ide.org> wrote: > > > "Swizzling" is the name for replacing the Objective C method pointers > > using method_exchangeImplementations. It's not the same as overriding it. > > > > Quite an interesting technique. I'm quite confident it's being heavily used > for Javascript. > (I guess it's somewhat natural for reflective languages to use it) > > Though I'd consider going that low level as a last resort, rather than a > permanent solution. > > thanks, > Dmitry Kind Regards, Tobias Giesen Super Flexible Software GmbH & Co. KG Buddenstr. 29-31 48143 Münster, Germany www.superflexible.com www.tgtools.com ----------------------------------------------------------- Registered at register court Münster as HRA 9716 Liability / general partner: TGTools GmbH Registered at register court Münster as HRB 17763 Directors: Tobias Giesen and Claudia Giesen From skalogryz.lists at gmail.com Thu Jun 13 19:42:38 2019 From: skalogryz.lists at gmail.com (Dmitry Boyarintsev) Date: Thu, 13 Jun 2019 13:42:38 -0400 Subject: [Lazarus] Modal Window Crashes on Mac OS X 10.15 Beta (Catalina) In-Reply-To: <20190613193508.A8B6.B7062D51@tgtools.de> References: <736d7b18-b236-dddd-b5a2-e797a2123248@scootersoftware.com> <20190613193508.A8B6.B7062D51@tgtools.de> Message-ID: thanks, but it's already in the trunk On Thursday, June 13, 2019, Tobias Giesen via lazarus < lazarus at lists.lazarus-ide.org> wrote: > Hello, > I found that the code must be corrected like this to avoid an Access > Violation if an event occurs before the aloop field is set. > > if Assigned(aloop) and not isrun then begin > isrun:=true; > Result:=nil; > aloop(); > terminate(nil); > exit; > end; > > Kind Regards, > > Tobias Giesen > Super Flexible Software GmbH & Co. KG > > ---- > > On Wed, 12 Jun 2019 15:10:17 -0400 > Dmitry Boyarintsev via lazarus wrote: > > > On Wed, Jun 12, 2019 at 11:48 AM Zoë Peterson via lazarus < > > lazarus at lists.lazarus-ide.org> wrote: > > > > > "Swizzling" is the name for replacing the Objective C method pointers > > > using method_exchangeImplementations. It's not the same as > overriding it. > > > > > > > Quite an interesting technique. I'm quite confident it's being heavily > used > > for Javascript. > > (I guess it's somewhat natural for reflective languages to use it) > > > > Though I'd consider going that low level as a last resort, rather than a > > permanent solution. > > > > thanks, > > Dmitry > > Kind Regards, > Tobias Giesen > > Super Flexible Software GmbH & Co. KG > Buddenstr. 29-31 > 48143 Münster, Germany > www.superflexible.com > www.tgtools.com > > ----------------------------------------------------------- > Registered at register court Münster as HRA 9716 > Liability / general partner: TGTools GmbH > Registered at register court Münster as HRB 17763 > Directors: Tobias Giesen and Claudia Giesen > > -- > _______________________________________________ > lazarus mailing list > lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From skalogryz.lists at gmail.com Fri Jun 14 15:16:08 2019 From: skalogryz.lists at gmail.com (Dmitry Boyarintsev) Date: Fri, 14 Jun 2019 09:16:08 -0400 Subject: [Lazarus] Modal Window Crashes on Mac OS X 10.15 Beta (Catalina) In-Reply-To: References: <736d7b18-b236-dddd-b5a2-e797a2123248@scootersoftware.com> <20190613193508.A8B6.B7062D51@tgtools.de> Message-ID: There's one more thing about not overriding run method. The event loop needs to be "terminated" and/or "stopped" in order for run method to return. If it doesn't return, Pascal unit finalization section won't run, and that's not good. thanks, Dmitry -------------- next part -------------- An HTML attachment was scrubbed... URL: From rogmartins at gmail.com Fri Jun 14 19:19:01 2019 From: rogmartins at gmail.com (=?UTF-8?Q?Rog=C3=A9rio_Martins?=) Date: Fri, 14 Jun 2019 14:19:01 -0300 Subject: [Lazarus] Get the number of pages in a pdf file Message-ID: Hi ! Is there a function for read info about a pdf file ? I need to know the number of pages in a given pdf file. Thanks -- The Ubuntu Counter Project - user number # 33192 -------------- next part -------------- An HTML attachment was scrubbed... URL: From leobronstain at gmail.com Fri Jun 14 23:51:13 2019 From: leobronstain at gmail.com (leyba bronstain) Date: Sat, 15 Jun 2019 00:51:13 +0300 Subject: [Lazarus] I found an AnchorDockingDsgn package bug? Message-ID: <2a413d31-3d34-b6ef-4b1f-19fc82041010@gmail.com> Hi. After installing the AnchorDockingDsgn package for Win7 x64, I noticed a strange IDE behavior. If you dock any other window to the Source Code Editor in the manner shown in the figure, then it becomes impossible to close any tab of the Source Code Editor using the mouse (using the shortcuts, the tab is closed correctly). It's a bug? See more here: https://forum.lazarus.freepascal.org/index.php/topic,45728.0.html With best regards, Zoltanleo From aaa5500 at ya.ru Sat Jun 15 11:43:43 2019 From: aaa5500 at ya.ru (AlexeyT) Date: Sat, 15 Jun 2019 12:43:43 +0300 Subject: [Lazarus] Wiki shows error on uploading new version of PNG image Message-ID: <345a0eab-c6fc-3e31-3d11-86ebd775d4a9@ya.ru> Database error A database query error has occurred. This may indicate a bug in the software. [abf9cf9f7950256477509e2b] /Special:Upload Wikimedia\Rdbms\DBQueryError from line 1457 of /srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading? Query: RELEASE SAVEPOINT `wikimedia_rdbms_atomic1` Function: LocalFile::recordUpload2 Error: 1305 SAVEPOINT wikimedia_rdbms_atomic1 does not exist (localhost) Backtrace: #0 /srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php(1427): Wikimedia\Rdbms\Database->makeQueryException(string, integer, string, string) #1 /srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php(1200): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean) #2 /srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php(3498): Wikimedia\Rdbms\Database->query(string, string) #3 /srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php(3584): Wikimedia\Rdbms\Database->doReleaseSavepoint(string, string) #4 /srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php(2953): Wikimedia\Rdbms\Database->endAtomic(string) #5 /srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php(2880): Wikimedia\Rdbms\Database->nonNativeInsertSelect(string, array, array, array, string, array, array, array) #6 /srv/www/lazaruswiki/includes/filerepo/file/LocalFile.php(1606): Wikimedia\Rdbms\Database->insertSelect(string, array, array, array, string, array, array, array) #7 /srv/www/lazaruswiki/includes/filerepo/file/LocalFile.php(1364): LocalFile->recordUpload2(string, string, boolean, array, string, User, array) #8 /srv/www/lazaruswiki/includes/upload/UploadBase.php(868): LocalFile->upload(string, string, boolean, integer, array, boolean, User, array) #9 /srv/www/lazaruswiki/includes/specials/SpecialUpload.php(567): UploadBase->performUpload(string, boolean, boolean, User, array) #10 /srv/www/lazaruswiki/includes/specials/SpecialUpload.php(207): SpecialUpload->processUpload() #11 /srv/www/lazaruswiki/includes/specialpage/SpecialPage.php(565): SpecialUpload->execute(NULL) #12 /srv/www/lazaruswiki/includes/specialpage/SpecialPageFactory.php(568): SpecialPage->run(NULL) #13 /srv/www/lazaruswiki/includes/MediaWiki.php(288): SpecialPageFactory::executePath(Title, RequestContext) #14 /srv/www/lazaruswiki/includes/MediaWiki.php(861): MediaWiki->performRequest() #15 /srv/www/lazaruswiki/includes/MediaWiki.php(524): MediaWiki->main() #16 /srv/www/lazaruswiki/index.php(42): MediaWiki->run() #17 {main} -- Regards, Alexey -------------- next part -------------- An HTML attachment was scrubbed... URL: From mailinglists at geldenhuys.co.uk Sat Jun 15 13:56:18 2019 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Sat, 15 Jun 2019 12:56:18 +0100 Subject: [Lazarus] Get the number of pages in a pdf file In-Reply-To: References: Message-ID: <9f63499d-33b4-0272-f87e-b5da53cb83a8@geldenhuys.co.uk> On 14/06/2019 6:19 pm, Rogério Martins via lazarus wrote: > Is there a function for read info about a pdf file ? I need to know the > number of pages in a given pdf file. I don't know of a Object Pascal library you can you, but there is an alternative. The PDF fromat is a mixture of text and binary. You can search for text as follows: /Type /Pages /Count 45 After the "/Type /Pages" there should be a "/Count " line which contains the page count. Hope that helps. 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 aaa5500 at ya.ru Sat Jun 15 15:27:42 2019 From: aaa5500 at ya.ru (AlexeyT) Date: Sat, 15 Jun 2019 16:27:42 +0300 Subject: [Lazarus] Cocoa: restoring windows order after reactivating the application Message-ID: <82721b04-bb4f-afaf-44b0-cc07f9916634@ya.ru> https://github.com/graemeg/lazarus/commit/4a95f3638a6ec38e6c975164b52c9f6d54c7ad10 orderArray. Better make its type "array of TWinOrderLevel" and set its size as SetLength(orderArray, N), and SetLength(orderArray, 0) to free. This is better practice, more pascalish way to allocate array. -- Regards, Alexey From skalogryz.lists at gmail.com Sat Jun 15 16:27:19 2019 From: skalogryz.lists at gmail.com (Dmitry Boyarintsev) Date: Sat, 15 Jun 2019 10:27:19 -0400 Subject: [Lazarus] Cocoa: restoring windows order after reactivating the application In-Reply-To: <82721b04-bb4f-afaf-44b0-cc07f9916634@ya.ru> References: <82721b04-bb4f-afaf-44b0-cc07f9916634@ya.ru> Message-ID: managed types are not allowed in objc objects. as FPC doesn't manage them there (yet). On Saturday, June 15, 2019, AlexeyT via lazarus < lazarus at lists.lazarus-ide.org> wrote: > https://github.com/graemeg/lazarus/commit/4a95f3638a6ec38e6c > 975164b52c9f6d54c7ad10 > > orderArray. Better make its type "array of TWinOrderLevel" and set its > size as SetLength(orderArray, N), and SetLength(orderArray, 0) to free. > This is better practice, more pascalish way to allocate array. > > -- > Regards, > Alexey > > -- > _______________________________________________ > lazarus mailing list > lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From svaa at ciberpiula.net Sun Jun 16 13:16:07 2019 From: svaa at ciberpiula.net (Santiago A.) Date: Sun, 16 Jun 2019 13:16:07 +0200 Subject: [Lazarus] Get the number of pages in a pdf file In-Reply-To: <9f63499d-33b4-0272-f87e-b5da53cb83a8@geldenhuys.co.uk> References: <9f63499d-33b4-0272-f87e-b5da53cb83a8@geldenhuys.co.uk> Message-ID: El 15/06/2019 a las 13:56, Graeme Geldenhuys via lazarus escribió: > On 14/06/2019 6:19 pm, Rogério Martins via lazarus wrote: >> Is there a function for read info about a pdf file ? I need to know the >> number of pages in a given pdf file. > I don't know of a Object Pascal library you can you, but there is an > alternative. The PDF fromat is a mixture of text and binary. You can > search for text as follows: > > /Type /Pages > /Count 45 > > After the "/Type /Pages" there should be a "/Count " line which > contains the page count. Hope that helps. It is not completely reliably. I used to search "/Type /Pages", but a day I couldn't find it, after digging a little in the PDF, I discovered that the number of pages was stored in a compressed stream.  PDF can sore any data in a compressed stream and they decided to compress page information. And since then I have begun to find it more frequently.  I suppose that once you have the frame work to compress stream, why not compress everything. I can't see what are the advantages of compressing a few bytes, but it's there. Now I try to search "/Type /Pages" and if I can't find it I call a external utility "pdftk" -- Saludos Santiago A. From m-w-vogel at gmx.de Sun Jun 16 23:43:43 2019 From: m-w-vogel at gmx.de (Michael W. Vogel) Date: Sun, 16 Jun 2019 23:43:43 +0200 Subject: [Lazarus] I found an AnchorDockingDsgn package bug? In-Reply-To: <2a413d31-3d34-b6ef-4b1f-19fc82041010@gmail.com> References: <2a413d31-3d34-b6ef-4b1f-19fc82041010@gmail.com> Message-ID: <6be0cce7-f9a8-d4c6-1e35-576aac5ed546@gmx.de> Am 14.06.2019 um 23:51 schrieb leyba bronstain via lazarus: > After installing the AnchorDockingDsgn package for Win7 x64, I noticed > a strange IDE behavior. If you dock any other window to the Source > Code Editor in the manner shown in the figure, then it becomes > impossible to close any tab of the Source Code Editor using the mouse > (using the shortcuts, the tab is closed correctly). It's a bug? > > See more here: > https://forum.lazarus.freepascal.org/index.php/topic,45728.0.html Yes, I can confirm that problem. The SourceEditor doesn't have a default PopupMenu, it is created on MouseUp. So the AnchorDockingPageControl is opening its PopupMenu. I could recreate the problem in a simple app. Imho a simple workaround could be to create a dummy PopupMenu for SourceEditor, something like the added patch. Can you please open a bug report on Mantis?! Michl -------------- next part -------------- Index: ide/sourceeditor.pp =================================================================== --- ide/sourceeditor.pp (revision 61401) +++ ide/sourceeditor.pp (working copy) @@ -657,6 +657,7 @@ private FNotebook: TExtendedNotebook; FBaseCaption: String; + FDummyPopupMenu: TPopupMenu; FIsClosing: Boolean; FSrcEditsSortedForFilenames: TAvlTree; // TSourceEditorInterface sorted for Filename TabPopUpMenu, SrcPopUpMenu, DbgPopUpMenu: TPopupMenu; @@ -6557,6 +6558,8 @@ OnTabEndDrag := @NotebookEndDrag; ShowHint:=true; OnShowHint:=@NotebookShowTabHint; + FDummyPopupMenu := TPopupMenu.Create(Self); + PopupMenu := FDummyPopupMenu; {$IFDEF IDE_DEBUG} debugln('[TSourceNotebook.CreateNotebook] D'); {$ENDIF} From xlazarus at code4sale.com Mon Jun 17 04:01:12 2019 From: xlazarus at code4sale.com (xlazarus at code4sale.com) Date: Sun, 16 Jun 2019 22:01:12 -0400 Subject: [Lazarus] Get the number of pages in a pdf file Message-ID: <0Ekyhy-1iQ0Ki1ZLY-00phts@infong1003.perfora.net> Searching for strings of /Pages and /Count would be highly unreliable. At worst, you would need to search the whole file, adding the entries. To do it right, you need to get the page tree of the document catalog, then recursively look up the kids of each page tree node, increment the count, then visit the all child nodes. There are many libraries that can do this, both free, and commercial. Joe C. Hecht UberPDF.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From skalogryz.lists at gmail.com Mon Jun 17 17:41:49 2019 From: skalogryz.lists at gmail.com (Dmitry Boyarintsev) Date: Mon, 17 Jun 2019 11:41:49 -0400 Subject: [Lazarus] Modal Window Crashes on Mac OS X 10.15 Beta (Catalina) In-Reply-To: References: <736d7b18-b236-dddd-b5a2-e797a2123248@scootersoftware.com> <20190613193508.A8B6.B7062D51@tgtools.de> Message-ID: On Fri, Jun 14, 2019 at 9:16 AM Dmitry Boyarintsev < skalogryz.lists at gmail.com> wrote: > There's one more thing about not overriding run method. > The event loop needs to be "terminated" and/or "stopped" in order for run > method to return. > If it doesn't return, Pascal unit finalization section won't run, and > that's not good. > A couple of things... I've modified the original patch changing terminate(nil) to stop(nil). That should take care of FPC friendly application termination. I've also started on COCOALOOPNATIVE, Which seems to be as a safest (and the most Cocoa friendly) approach. As it does use native- run method, yet it doesn't hi-jack the loop to call LCL event. https://wiki.freepascal.org/Cocoa_Internals/Application#Native_Loop_.28COCOALOOPNATIVE.29 However, at this point, COCOALOOPHIJACK is used by default thanks, Dmitry -------------- next part -------------- An HTML attachment was scrubbed... URL: From sysrpl at gmail.com Wed Jun 19 14:39:05 2019 From: sysrpl at gmail.com (Anthony Walter) Date: Wed, 19 Jun 2019 08:39:05 -0400 Subject: [Lazarus] Printing TStrings with a TFont Message-ID: Does anyone have an example of printing with Lazarus using TStrings and a TFont? I tried something the other day, and although I had the Lazarus printer4lazarus.lpk package installed, and used the printer dialog, nothing seemed to print with BeginDoc, Canvas.TextOut, EndDoc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sysrpl at gmail.com Sat Jun 22 05:47:11 2019 From: sysrpl at gmail.com (Anthony Walter) Date: Fri, 21 Jun 2019 23:47:11 -0400 Subject: [Lazarus] Demo for Computer Camp on Monday Message-ID: Some of you might have been following a few of my recent posts and know that I have been tutoring kids on the subject of computer programming. Iv'e been using Lazarus as an introduction with some kids, but on Monday I am going to put on a little presentation for a group at summer camp to spur their interest in our mini computer camp sessions. I wanted to ask you, the Lazarus community, what existing open source Lazarus projects would be good example to engage kids between the ages of 8 and 14? I am looking for some existing projects that have a simple code base, yet do something unusual or fun that might interest kids. Examples might include (written in Free Pascal and easily compiled): A nyan cat and song with animation and rainbows. A painting program that can lay out many different shapes rapidly with many colors. A visually impressive version of a board game like Scrabble or Sorry. Any animated fractal rendering program, especially one where the program allows you to create your own fractals. A simple 2D physics program with features you can control. Any type of complex interactive visual effects (and runs on low end hardware). Or any other program that is free open source and might be interesting to show briefly to a group of kids. The only requirements would be that these are free open source demo, do not require many extra pascal packages, and can run on low end hardware (Core2 Duo 4GB RAM). Thank you and I'll let everyone know how many kids sign up for out mini coding camp and the end of next week. -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at freepascal.org Sat Jun 22 07:06:14 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Sat, 22 Jun 2019 07:06:14 +0200 (CEST) Subject: [Lazarus] Demo for Computer Camp on Monday In-Reply-To: References: Message-ID: Hi, Blaise pascal magazine has a simple pacman game demo, written in lazarus. It's a one-unit program, just the main form. I think I still have the sources somewhere. It's definitely open source. Michael. On Fri, 21 Jun 2019, Anthony Walter via lazarus wrote: > Some of you might have been following a few of my recent posts and know > that I have been tutoring kids on the subject of computer programming. Iv'e > been using Lazarus as an introduction with some kids, but on Monday I am > going to put on a little presentation for a group at summer camp to spur > their interest in our mini computer camp sessions. > > I wanted to ask you, the Lazarus community, what existing open source > Lazarus projects would be good example to engage kids between the ages of 8 > and 14? I am looking for some existing projects that have a simple code > base, yet do something unusual or fun that might interest kids. > > Examples might include (written in Free Pascal and easily compiled): > > A nyan cat and song with animation and rainbows. > A painting program that can lay out many different shapes rapidly with many > colors. > A visually impressive version of a board game like Scrabble or Sorry. > Any animated fractal rendering program, especially one where the program > allows you to create your own fractals. > A simple 2D physics program with features you can control. > Any type of complex interactive visual effects (and runs on low end > hardware). > > Or any other program that is free open source and might be interesting to > show briefly to a group of kids. > > The only requirements would be that these are free open source demo, do not > require many extra pascal packages, and can run on low end hardware (Core2 > Duo 4GB RAM). > > Thank you and I'll let everyone know how many kids sign up for out mini > coding camp and the end of next week. > From sysrpl at gmail.com Mon Jun 24 09:17:54 2019 From: sysrpl at gmail.com (Anthony Walter) Date: Mon, 24 Jun 2019 03:17:54 -0400 Subject: [Lazarus] Now Available Raspberry Pi 4 Message-ID: For those of you that use Lazarus on the Raspberry Pi, you might be pleased to learn that the Raspberry Pi 4 was revealed a hour ago and is available for order. https://www.raspberrypi.org/blog/raspberry-pi-4-on-sale-now-from-35/ Improvements include a 3x performance boots, up to 4 GB of RAM, USB 3.0, dual HDMI out, a new 3D graphics core, and more. With these changes I can see the Pi now as a complete desktop replacement computer. That is, something which is capable of doing everything you need with a computer. It should have no problem quickly lading multiple web pages, playing web video, running all the normal desktop applications such as Gimp, Audacity, and Lazarus. I will be ordering one as soon as I can get the new case without buying the full kit. I will also be updating my download page to include a special version of FPC and Lazarus more suited to the Pi 4. Cheers, Anthony -------------- next part -------------- An HTML attachment was scrubbed... URL: From zmuogs at gmail.com Mon Jun 24 15:39:16 2019 From: zmuogs at gmail.com (=?UTF-8?Q?Valdas_Jank=c5=abnas?=) Date: Mon, 24 Jun 2019 16:39:16 +0300 Subject: [Lazarus] lazbuild: package not found Message-ID: <4db959f3-818b-d889-e9b6-edd94ed36160@gmail.com> Hello, I tried (using lazbuild v2.1.0 from SVN trunk): :~/Svn/lazarus$ lazbuild --build-ide= --add-package tachartlazaruspkg Error: (lazbuild) package not found: tachartlazaruspkg Before update from SVN this command worked without problems. Also tried: ~/Svn/lazarus$ lazbuild --verbose-pkgsearch LCL Error: (lazbuild) package not found: LCL A bug in lazbuild? Adding packages through GUI works without problems. -- Valdas Jankūnas From nc-gaertnma at netcologne.de Mon Jun 24 16:19:24 2019 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Mon, 24 Jun 2019 16:19:24 +0200 Subject: [Lazarus] lazbuild: package not found In-Reply-To: <4db959f3-818b-d889-e9b6-edd94ed36160@gmail.com> References: <4db959f3-818b-d889-e9b6-edd94ed36160@gmail.com> Message-ID: <20190624161924.7238a6fb@limapholos.matflo.wg> On Mon, 24 Jun 2019 16:39:16 +0300 Valdas Jankūnas via lazarus wrote: > Hello, > > I tried (using lazbuild v2.1.0 from SVN trunk): > > :~/Svn/lazarus$ lazbuild --build-ide= --add-package tachartlazaruspkg > Error: (lazbuild) package not found: tachartlazaruspkg Fixed. > Before update from SVN this command worked without problems. > > Also tried: > > ~/Svn/lazarus$ lazbuild --verbose-pkgsearch LCL > Error: (lazbuild) package not found: LCL That is not how "--verbose-pkgsearch" works. This option only increases verbosity of other operations. It does not search a package on its own. Mattias From zmuogs at gmail.com Mon Jun 24 16:29:32 2019 From: zmuogs at gmail.com (=?UTF-8?Q?Valdas_Jank=c5=abnas?=) Date: Mon, 24 Jun 2019 17:29:32 +0300 Subject: [Lazarus] lazbuild: package not found In-Reply-To: <20190624161924.7238a6fb@limapholos.matflo.wg> References: <4db959f3-818b-d889-e9b6-edd94ed36160@gmail.com> <20190624161924.7238a6fb@limapholos.matflo.wg> Message-ID: <628c6cf2-30c7-fcc8-8ac6-9f486d7a70df@gmail.com> 2019-06-24 17:19, Mattias Gaertner via lazarus rašė: > On Mon, 24 Jun 2019 16:39:16 +0300 > Valdas Jankūnas via lazarus wrote: > >> I tried (using lazbuild v2.1.0 from SVN trunk): >> >> :~/Svn/lazarus$ lazbuild --build-ide= --add-package tachartlazaruspkg >> Error: (lazbuild) package not found: tachartlazaruspkg > > Fixed. > > Mattias > Thanks. -- Valdas Jankūnas From mailinglists at geldenhuys.co.uk Mon Jun 24 21:21:39 2019 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Mon, 24 Jun 2019 20:21:39 +0100 Subject: [Lazarus] Now Available Raspberry Pi 4 In-Reply-To: References: Message-ID: <44e81999-81a1-1521-bb36-e2438dfd7311@geldenhuys.co.uk> On 24/06/2019 8:17 am, Anthony Walter via lazarus wrote: > With these changes I can see the Pi now as a complete desktop replacement > computer. And only starting at $35 - mind blowing stuff! :-) ps: Thanks for the announcement. Regards, Graeme From sysrpl at gmail.com Mon Jun 24 23:47:16 2019 From: sysrpl at gmail.com (Anthony Walter) Date: Mon, 24 Jun 2019 17:47:16 -0400 Subject: [Lazarus] I've selected course materials for coding camp 2019. Feedback request. Message-ID: Here is a page I've setup with an overview of some of the materials and subject I am teach kids at this years summer coding camp. https://www.getlazarus.org/learn/camp/ Everything is based on cross platform open source Lazarus and Free Pascal Projects. Please feel free to view the course materials video and leave feedback. -------------- next part -------------- An HTML attachment was scrubbed... URL: From freedos.la at gmail.com Mon Jun 24 23:58:54 2019 From: freedos.la at gmail.com (Ralf Quint) Date: Mon, 24 Jun 2019 14:58:54 -0700 Subject: [Lazarus] Now Available Raspberry Pi 4 In-Reply-To: <44e81999-81a1-1521-bb36-e2438dfd7311@geldenhuys.co.uk> References: <44e81999-81a1-1521-bb36-e2438dfd7311@geldenhuys.co.uk> Message-ID: <5d26837c-2217-dd50-869c-15295e6d5566@gmail.com> On 6/24/2019 12:21 PM, Graeme Geldenhuys via lazarus wrote: > On 24/06/2019 8:17 am, Anthony Walter via lazarus wrote: >> With these changes I can see the Pi now as a complete desktop replacement >> computer. > > And only starting at $35 - mind blowing stuff! :-) Well, "starting at"... The 4GB version ("wenn schon, denn schon"... ;-) ) is $55, add to that that you need also a 5V/3A power supply, a SD card and now new (mini) HDMI cables or adapters. Add a screen/monitor to it, and/or a camera, keyboard, mouse and you are north of $100, in range where you get a low end notebook these days... Nevertheless, it is a nice step of evolution, specially now that it has a dedicate Gigabit Ethernet and WiFi chip and doesn't (ab)use the USB controller for that as on previous models. Wish they could decide to make a 2 or 3 Ethernet port model, so you can build a really nice and handy firewall/VPN gateway... :P That said, Lazarus was workable on a RPi3B+, with just 1GB of RAM... Ralf --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus From sysrpl at gmail.com Tue Jun 25 01:00:42 2019 From: sysrpl at gmail.com (Anthony Walter) Date: Mon, 24 Jun 2019 19:00:42 -0400 Subject: [Lazarus] Now Available Raspberry Pi 4 In-Reply-To: <5d26837c-2217-dd50-869c-15295e6d5566@gmail.com> References: <44e81999-81a1-1521-bb36-e2438dfd7311@geldenhuys.co.uk> <5d26837c-2217-dd50-869c-15295e6d5566@gmail.com> Message-ID: Ralf, if you already have a Pi 3 power adapter, you can buy an official Pi tip to convert the micro USB to USB C for only $1. It's on their store. Also, this Pi has power over ethernet, so you can power it using that instead of the USB headers. Finally, if you were powering a Pi 3 via GPIO, nothing changes. -------------- next part -------------- An HTML attachment was scrubbed... URL: From freedos.la at gmail.com Tue Jun 25 06:11:37 2019 From: freedos.la at gmail.com (Ralf Quint) Date: Mon, 24 Jun 2019 21:11:37 -0700 Subject: [Lazarus] Now Available Raspberry Pi 4 In-Reply-To: References: <44e81999-81a1-1521-bb36-e2438dfd7311@geldenhuys.co.uk> <5d26837c-2217-dd50-869c-15295e6d5566@gmail.com> Message-ID: <4ab1cbee-2cfe-71a3-ffd7-58495f6d73f1@gmail.com> On 6/24/2019 4:00 PM, Anthony Walter via lazarus wrote: > Ralf, if you already have a Pi 3 power adapter, you can buy an > official Pi tip to convert the micro USB to USB C for only $1. It's on > their store. Also, this Pi has power over ethernet, so you can power > it using that instead of the USB headers. Finally, if you were > powering a Pi 3 via GPIO, nothing changes. > I read the specs that came out last night, that not only the connector for the power changed, but also that it needs a stronger power supply. PoE is a dud option, beside that you need the addition PoE hat, and power via GPIO is not a "simple" one for someone who's looking into a desktop PC... Ralf --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus -------------- next part -------------- An HTML attachment was scrubbed... URL: From sysrpl at gmail.com Tue Jun 25 07:33:31 2019 From: sysrpl at gmail.com (Anthony Walter) Date: Tue, 25 Jun 2019 01:33:31 -0400 Subject: [Lazarus] Now Available Raspberry Pi 4 In-Reply-To: <4ab1cbee-2cfe-71a3-ffd7-58495f6d73f1@gmail.com> References: <44e81999-81a1-1521-bb36-e2438dfd7311@geldenhuys.co.uk> <5d26837c-2217-dd50-869c-15295e6d5566@gmail.com> <4ab1cbee-2cfe-71a3-ffd7-58495f6d73f1@gmail.com> Message-ID: > > Ralf, the recommended power adapter for a rpi3 was 3 amp, the same as the > rpi4. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mailinglists at geldenhuys.co.uk Tue Jun 25 07:35:40 2019 From: mailinglists at geldenhuys.co.uk (Graeme Geldenhuys) Date: Tue, 25 Jun 2019 06:35:40 +0100 Subject: [Lazarus] Now Available Raspberry Pi 4 In-Reply-To: <5d26837c-2217-dd50-869c-15295e6d5566@gmail.com> References: <44e81999-81a1-1521-bb36-e2438dfd7311@geldenhuys.co.uk> <5d26837c-2217-dd50-869c-15295e6d5566@gmail.com> Message-ID: <50335e37-05ea-34ca-d539-3b456131ef77@geldenhuys.co.uk> On 24/06/2019 10:58 pm, Ralf Quint via lazarus wrote: > The 4GB version ("wenn schon, denn schon"... ;-) ) is $55, add to that > that you need also a 5V/3A power supply, a SD card and now new (mini) > HDMI cables or adapters. Add a screen/monitor to it, and/or a camera, > keyboard, mouse and you are north of $100, in range where you get a low > end notebook these days... I get what you are saying, but simply reusing a mobile phone charger or Macbook/laptop charger for power should do. Most RPi users should already have a SD card and other peripherals lying around - or simply RDP/SSH into the PRi and no extra peripherals are needed. One or two less takeaway Lattes (coffee) for one month and you paid for your HDMI cable or dedicated power supply. ;-) I still think the RPi is an amazing accomplishment. My old company has done some amazing things with the original RPi v1's (I still have one too). Regards, Graeme From Special at Joepgen.com Tue Jun 25 12:05:01 2019 From: Special at Joepgen.com (Joe) Date: Tue, 25 Jun 2019 12:05:01 +0200 Subject: [Lazarus] Now Available Raspberry Pi 4 /Lazarus has problem with it In-Reply-To: References: Message-ID: <65e01c80-fda2-f8aa-187e-fe2dd5c1b7ee@Joepgen.com> Am 24.06.2019 um 09:17 schrieb Anthony Walter via lazarus: > For those of you that use Lazarus on the Raspberry Pi, you might be > pleased to learn that the Raspberry Pi 4 was revealed a hour ago and > is available for order. > > https://www.raspberrypi.org/blog/raspberry-pi-4-on-sale-now-from-35/ > > Improvements include a 3x performance boots, up to 4 GB of RAM, USB > 3.0, dual HDMI out, a new 3D graphics core, and more. > > With these changes I can see the Pi now as a complete desktop > replacement computer. That is, something which is capable of doing > everything you need with a computer. It should have no problem quickly > lading multiple web pages, playing web video, running all the normal > desktop applications such as Gimp, Audacity, and Lazarus. > > I will be ordering one as soon as I can get the new case without > buying the full kit. I will also be updating my download page to > include a special version of FPC and Lazarus more suited to the Pi 4. > > Cheers, > Anthony > Hi, all, with the Pi 4 a new OS version appeared, Raspian Buster. On this I selected "Add/Remove Software" and clicked on "IDE for Free Pascal - Suite / lazarus -2.0-2.0.0-dfsg-2". Lazarus 2 was installed and I clicked on "IDE starten". But then this error message appeared: "The package EditorMacroScript (pascalscript macros) has detected a problem and was deactivated. The package failed it's selftest with the message 'Replace All [Exc: True / Got_ False]'" How to fix? Regards --  Joe Regards --  Joe -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.ioannidis at nephelae.eu Tue Jun 25 15:42:57 2019 From: d.ioannidis at nephelae.eu (Dimitrios Chr. Ioannidis) Date: Tue, 25 Jun 2019 16:42:57 +0300 Subject: [Lazarus] =?utf-8?q?Forum_down_=3F?= Message-ID: <655dafe5c0ea9d9d3d3a8215307cfa0c@nephelae.eu> Hi, I just tried to connect to https://forum.lazarus.freepascal.org/ and I got : "Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later. ...." Is it under maintenance ? regards, -- Dimitrios Chr. Ioannidis From williamoferreira at outlook.com Tue Jun 25 15:52:01 2019 From: williamoferreira at outlook.com (William Ferreira) Date: Tue, 25 Jun 2019 13:52:01 +0000 Subject: [Lazarus] LazForum error Message-ID: Hi, I got this error when trying to open forum (url: https://forum.lazarus.freepascal.org/index.php?topic=16934.0): [http://graph.facebook.com/v2.3/10203573618411389/picture?type=large] Support for Git? - forum.lazarus.freepascal.org It must be because 2 people got commit access rights for Lazarus repository that day. There is a list of accepted committer names and email addresses in Graeme's mirror system. forum.lazarus.freepascal.org Connection Problems Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later. --#0 show_db_error() called at [/var/www/sites/smf/Sources/Errors.php:72] #1 db_fatal_error() called at [/var/www/sites/smf/Sources/Subs-Db-mysql.php:799] #2 SMF_DB_MySQLi->initiate(localhost, smf, lazforum, yebgfhjkm,kby, smf_, Array ([persist] => 0,[dont_select_db] => )) called at [/var/www/sites/smf/Sources/Subs-Db-mysql.php:35] #3 smf_db_initiate(localhost, smf, lazforum, yebgfhjkm,kby, smf_, Array ([persist] => 0,[dont_select_db] => )) called at [/var/www/sites/smf/Sources/Load.php:2611] #4 loadDatabase() called at [/var/www/sites/smf/index.php:69] Just for reporting William de Oliveira Ferreira Desenvolvedor Web/Desktop > (13) 9 8156-2838 - Whatsapp > https://www.facebook.com/williamoferreira -------------- next part -------------- An HTML attachment was scrubbed... URL: From leobronstain at gmail.com Wed Jun 26 00:15:14 2019 From: leobronstain at gmail.com (leyba bronstain) Date: Wed, 26 Jun 2019 01:15:14 +0300 Subject: [Lazarus] OPM: Incompatible package list Message-ID: <795d9d67-3eca-5e5b-147f-203cc3c1ba46@gmail.com> Hi all. I observe the latest versions of the compiler such an error (for more see the attachment) when I try to install any component from the OPM. Any thoughts? I try to use fpc trunk(r42282)/lazarus trunk(r61478) x32 on Win7 x64 -- with best regards, Zoltanleo -------------- next part -------------- A non-text attachment was scrubbed... Name: ScrShot1905.png Type: image/png Size: 8072 bytes Desc: not available URL: From fluisgirardi at gmail.com Wed Jun 26 03:06:40 2019 From: fluisgirardi at gmail.com (Fabio Luis Girardi) Date: Tue, 25 Jun 2019 22:06:40 -0300 Subject: [Lazarus] Lazarus website is down Message-ID: Lazarus website is down? I tried www.lazarus-ide.org and I got a strange PHP error, something related with MySQL connection... So what's happening? -------------- next part -------------- An HTML attachment was scrubbed... URL: From sam_herzog at yahoo.com Wed Jun 26 06:27:27 2019 From: sam_herzog at yahoo.com (Samuel Herzog) Date: Wed, 26 Jun 2019 04:27:27 +0000 (UTC) Subject: [Lazarus] Lazarus website is down In-Reply-To: References: Message-ID: <1519492073.105992.1561523247917@mail.yahoo.com> Hi, can we help somehow to get the lazarus homepage working again? Grüsse,Sam Frische Musik für deine Ohren. DJ Duke -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at freepascal.org Wed Jun 26 06:46:10 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Wed, 26 Jun 2019 06:46:10 +0200 (CEST) Subject: [Lazarus] Lazarus website is down In-Reply-To: References: Message-ID: Seems the mysql db on the lazarus server is having problems. But only some of the lazarus devs have access to that machine. They need to fix it... Michael. On Tue, 25 Jun 2019, Fabio Luis Girardi via lazarus wrote: > Lazarus website is down? > > I tried www.lazarus-ide.org and I got a strange PHP error, something > related with MySQL connection... > > So what's happening? > From marc at dommelstein.nl Wed Jun 26 10:08:54 2019 From: marc at dommelstein.nl (Marc Weustink) Date: Wed, 26 Jun 2019 10:08:54 +0200 Subject: [Lazarus] Forum down ? In-Reply-To: <655dafe5c0ea9d9d3d3a8215307cfa0c@nephelae.eu> References: <655dafe5c0ea9d9d3d3a8215307cfa0c@nephelae.eu> Message-ID: <73cf4459-6b00-a3a0-da50-39c7f11ed12d@dommelstein.nl> Dimitrios Chr. Ioannidis via lazarus wrote: > Hi, > >   I just tried to connect to https://forum.lazarus.freepascal.org/ and > I got : > >   "Sorry, SMF was unable to connect to the database. This may be caused > by the server being busy. Please try again later. ...." > >   Is it under maintenance ? The database stopped resulting in this error. It should be up again. Marc From marc at dommelstein.nl Wed Jun 26 13:19:01 2019 From: marc at dommelstein.nl (Marc Weustink) Date: Wed, 26 Jun 2019 13:19:01 +0200 Subject: [Lazarus] Lazarus website is down In-Reply-To: References: Message-ID: Michael Van Canneyt via lazarus wrote: > > Seems the mysql db on the lazarus server is having problems. > > But only some of the lazarus devs have access to that machine. > They need to fix it... > > Michael. > > On Tue, 25 Jun 2019, Fabio Luis Girardi via lazarus wrote: > >> Lazarus website is down? >> >> I tried www.lazarus-ide.org and I got a strange  PHP error, something >> related with MySQL connection... >> >> So what's happening? Took me some time to understand what went wrong, since the Lazarus website doesn't need a database. However, the website fetches the last messages of the forum and the forum had a problem with the database. A restart of the DB solved it. Marc From getmem1 at gmail.com Thu Jun 27 15:47:36 2019 From: getmem1 at gmail.com (=?UTF-8?B?QmFsw6F6cyBTesOpa2VseQ==?=) Date: Thu, 27 Jun 2019 16:47:36 +0300 Subject: [Lazarus] OPM: Incompatible package list In-Reply-To: <795d9d67-3eca-5e5b-147f-203cc3c1ba46@gmail.com> References: <795d9d67-3eca-5e5b-147f-203cc3c1ba46@gmail.com> Message-ID: Hi, It's just a warning message. The package maintainer does not support fpc trunk. regards, Balázs On Wed, Jun 26, 2019 at 1:15 AM leyba bronstain via lazarus < lazarus at lists.lazarus-ide.org> wrote: > Hi all. > > I observe the latest versions of the compiler such an error (for more > see the attachment) when I try to install any component from the OPM. > > Any thoughts? > > I try to use fpc trunk(r42282)/lazarus trunk(r61478) x32 on Win7 x64 > > -- > with best regards, Zoltanleo > > -- > _______________________________________________ > lazarus mailing list > lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From leobronstain at gmail.com Fri Jun 28 00:03:22 2019 From: leobronstain at gmail.com (leyba bronstain) Date: Fri, 28 Jun 2019 01:03:22 +0300 Subject: [Lazarus] OPM: Incompatible package list In-Reply-To: References: <795d9d67-3eca-5e5b-147f-203cc3c1ba46@gmail.com> Message-ID: Yes, U're right. Thanks for the answer. 27.06.2019 16:47, Balázs Székely via lazarus пишет: > Hi, > > It's just a warning message. The package maintainer does not support > fpc trunk. > > regards, > Balázs > > On Wed, Jun 26, 2019 at 1:15 AM leyba bronstain via lazarus > > > wrote: > > Hi all. > > I observe the latest versions of the compiler such an error (for more > see the attachment) when I try to install any component from the OPM. > > Any thoughts? > > I try to use fpc trunk(r42282)/lazarus trunk(r61478) x32 on Win7 x64 > > -- > with best regards, Zoltanleo > > -- > _______________________________________________ > lazarus mailing list > lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus > > -- with best regards, Zoltanleo From werner.pamler at freenet.de Fri Jun 28 22:45:51 2019 From: werner.pamler at freenet.de (Werner Pamler) Date: Fri, 28 Jun 2019 22:45:51 +0200 Subject: [Lazarus] Critical discussion about Lazarus foundation Message-ID: <9e7b979d-b0ed-ac9c-a907-df83f57379ce@freenet.de> Once more, there is a critical discussion about the Lazarus foundation in the forum (https://forum.lazarus.freepascal.org/index.php/topic,45905.msg325308). I think there should be a competent answer by the leading people. Wener From michael at freepascal.org Sat Jun 29 01:17:01 2019 From: michael at freepascal.org (Michael Van Canneyt) Date: Sat, 29 Jun 2019 01:17:01 +0200 (CEST) Subject: [Lazarus] Critical discussion about Lazarus foundation In-Reply-To: <9e7b979d-b0ed-ac9c-a907-df83f57379ce@freenet.de> References: <9e7b979d-b0ed-ac9c-a907-df83f57379ce@freenet.de> Message-ID: On Fri, 28 Jun 2019, Werner Pamler via lazarus wrote: > Once more, there is a critical discussion about the Lazarus foundation > in the forum > (https://forum.lazarus.freepascal.org/index.php/topic,45905.msg325308). > I think there should be a competent answer by the leading people. Thank you for notifying me, I have attempted to answer. Michael. From sysrpl at gmail.com Sat Jun 29 05:10:29 2019 From: sysrpl at gmail.com (Anthony Walter) Date: Fri, 28 Jun 2019 23:10:29 -0400 Subject: [Lazarus] TMemo Undo and Redo History Message-ID: Can anyone recommend a simple class to associate with a TMemo that provides programmatic undo and redo? -------------- next part -------------- An HTML attachment was scrubbed... URL: From editor at blaisepascal.eu Sat Jun 29 15:13:02 2019 From: editor at blaisepascal.eu (editor at blaisepascal.eu) Date: Sat, 29 Jun 2019 15:13:02 +0200 Subject: [Lazarus] Remarks noted by Werner Message-ID: <001101d52e7c$625e0950$271a1bf0$@blaisepascal.eu> About message1: I have answered that on the website: https://forum.lazarus.freepascal.org/index.php/topic,45905.msg325308 I also answered also some things about the book. I am not sure whether I follow the right procedure… DETLEF D. OVERBEEK - EDITOR IN CHIEF / CHAIRMAN PRO PASCAL FOUNDATION WITH KIND REGARDS, MED VENLIG HILSEN, MET VRIENDELIJKE GROET, CORDIALEMENT, CORDIALI SALUTI, LE SALUDA ATENTAMENTE, MIT FREUNDLICHEN GRÜSSEN, С ИСКРЕННИМ УВАЖЕНИЕМ CONTACT: MOBYLE PHONE: +31 (0) 6 21 23 62 68 / Phone: +31 30 8906644 / SKYPE: DETLEF.OVERBEEK CELL PHONE: +31 (0) 6 21 23 62 68 / SKYPE: DETLEF.OVERBEEK EDELSTENENBAAN 21, 3402 XA IJSSELSTEIN / NETHERLANDS www.BlaisePascalMagazine.eu BLAISE PASCAL MAGAZINE WILL NOT SELL OR SHARE YOUR EMAIL OR POSTAL ADDRESS WITH UNRELATED THIRD PARTIES. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 895 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 2158 bytes Desc: not available URL: From bo.berglund at gmail.com Sun Jun 30 16:12:03 2019 From: bo.berglund at gmail.com (Bo Berglund) Date: Sun, 30 Jun 2019 16:12:03 +0200 Subject: [Lazarus] Now Available Raspberry Pi 4 References: <44e81999-81a1-1521-bb36-e2438dfd7311@geldenhuys.co.uk> <5d26837c-2217-dd50-869c-15295e6d5566@gmail.com> <50335e37-05ea-34ca-d539-3b456131ef77@geldenhuys.co.uk> Message-ID: On Tue, 25 Jun 2019 06:35:40 +0100, Graeme Geldenhuys via lazarus wrote: >I still think the RPi is an amazing accomplishment. My old company has >done some amazing things with the original RPi v1's (I still have one too). > Me too! I think I have 10+ RPi units now, probably from all versions including the one one had to que for when it was initially released. Can´t wait until the RPi4 is available in a store near me.... -- Bo Berglund Developer in Sweden