Re: [Lazarus] Docking search results
Am 17.01.2016 20:17 schrieb "Ondrej Pokorny": > > On 17.01.2016 19:29, Juha Manninen wrote: >> >> It is opened if it was left open when Lazarus was closed previously. > > > No, it is not. It is opened if you saved your desktop with search result dialog opened. If you saved your desktop with search result dialog closed, it won't be opened. > If you have enabled "auto save desktop" option and you close the IDE with search result dialog opened, of course it is opened the next time. > > This is correct behaviour. Do not change it!!! E.g. some people want the search result dialog have docked or opened by default. I agree. I don't mind it to be open from the beginning either, normally I'm docking it into a tab with the message window anyway. Which reminds me: would the Search tab be automatically brought to front if I search something and the Message tab is in the front? I know I could simply test that myself, but till I'm in front of a Lazarus today I'll probably have forgotten that... Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Opening non existing files and (not) adding them to the project
Am 17.01.2016 22:35 schrieb "Juha Manninen": > > On Sun, Jan 17, 2016 at 4:30 PM, Sven Barth wrote: > > Back in 1.4.x when I opened a non-existing file and I confirmed that I want > > to have it created the file was not added to project or the project's mainfile. > > [...] > > Now with 1.6RC2 I noticed that such files are added to the uses clause of > > the main program file and the project inspector. > > You cannot open a non-existing file, meaning that you cannot use the > File -> Open dialog for it. There is now a "FileMustExist" or similar > flag. I remember it fixed some bug but don't remember which one. > IMO it is logical because you can by definition only open existing > files. If a file does not exist, you must create it instead. Don't shock me like that, Juha. The IDE actively asks me whether I want to create a new file if I open a non existing one and it should definitely stay that way. Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Docking search results
Am 17.01.2016 19:29 schrieb "Juha Manninen": > @Sven: > > Ah, thanks. Will the reversal also be part of the final 1.6? > > Yes. It didn't make it to RC2 unfortunately. Ok, thanks :) Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Opening non existing files and (not) adding them to the project
Am 17.01.2016 20:36 schrieb "ListMember": > > On 2016-01-17 16:30, Sven Barth wrote: >> >> when I opened a non-existing file and I confirmed that I want to have it created the file was not added to project or the project's mainfile. > > > But, isn't this how Delphi has been doing it all these years. > > 1) When you create a new unit, it automatically gets added to the project. > > 2) When you decide to save the project, you're asked whether you want to save the newly added (not saved yet) units. If not, it is removed from the project and you lose its contents. > > 3) If you want to exclude the newly created unit, you remove it from the project. In that case, IDE asks you whether you wish to save that file (or lose it). > > Do you still/really want a 'non-standard' behavior? I don't care what Delphi does. I care about what Lazarus has done for years and what I have relied upon. For me this *is* standard behavior. Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Testing Unicode and Windows system codepage in Lazarus 1.6
Am 2016-01-17 um 19:48 schrieb Juha Manninen: > Jürgen and taazz, ... > The wiki page explaining it > should be improved and maintained by people who actually use the > system which means Jürgen, taazz, michl and others. Now that is cynical! Telling those who do not know anything about what has been developed over the last years to write the documentation theirselfs. Not the developers who know what they changed and what they had in mind when doing so should document their work but those who just use it. For whom is the documentation meant at all? Why not drop it and everything is fine? The code is there, just read it! I think with this attitude the whole project is doomed to fail. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] New menu designer
On 17/01/2016 12:33, Péter Gábor wrote: I found some Format calls that seems to be unneded: the first parameter for them contains only formatting symbols and the second an array of resourcestrings. If no one else is currently working on the resourcestrings issue I will try to finish my patch and post it on mantis... This is more simpler than writing a lot of letter about what and how to fix to be translation friendly. Do you agree? 2016-01-15 23:19 keltezéssel, Howard írta: On 14/01/2016 23:27, Maxim Ganetsky wrote: String "composing" is still present e. g. in "Insert from template" dialog ("Choose template to ..." groupbox caption) and in main menu creation form in "add menu item" fields captions. Also lismenueditororclickheadertosortbythatcolumn string looks suspicious from this POV. As for lismenueditormoveseparatedeleteinsertitems: you shouldn't try to align text with buttons this way. It won't work with other than Windows' fonts/font sizes (e.g. on Linux) and other languages. Better change this string to regular caption like "Menu Item actions". Also I noticed that e. g. "Insert from template" dialog is not resizable. It is better to have resizable dialogs in order to fit longer translation captions (e. g. combobox caption in this case). I have submitted a patch (29411) which I hope addresses these issues, except for the issue: 'String "composing" is still present ... in main menu creation form in "add menu item" fields captions' I am not clear about which string(s) you are identifying here. Can you give a specific line number in the source that exemplifies the problem you see? Howard Sure, fine by me. Go ahead. Howard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Opening non existing files and (not) adding them to the project
On 1/17/16, Juha Manninenwrote: > You cannot open a non-existing file, meaning that you cannot use the > File -> Open dialog for it. Yes tou can! Lazarus 1.7 r51253 FPC 3.0.0 i386-win32-win32/win64 Bart -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Opening non existing files and (not) adding them to the project
Am 17.01.2016 18:22 schrieb "Bart": > > On 1/17/16, Sven Barth wrote: > > > Is there some option I have missed to change this behavior? Because not > > only meeses this up the compiler project, but CodeTools don't like it as > > well as the files I add this way are usually program files, thus they > > shouldn't be in the uses section anyway. > > Odd. > > ProjectOptions->Miscallaneous-> "Main unit has uses section containing > all units of a project". > Uncheck and save as default compiler options? > > Would have expected that to be a global setting. That solves at least one part of the issue. The new file is however still added to the project which is not good. Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Docking search results
On Sun, Jan 17, 2016 at 6:58 PM, Ondrej Pokornywrote: > For me the search result dialog isn't initially opened in the undocked IDE. > Tested on Windows/win32. It is opened if it was left open when Lazarus was closed previously. The nature of that window is such that I want to see it only after actually searching something. @Sven: > Ah, thanks. Will the reversal also be part of the final 1.6? Yes. It didn't make it to RC2 unfortunately. Juha -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] New menu designer
I think we can use one resourcestring ('') instead of three: ''; ''; ''; Yes or No? 2016-01-17 17:33 keltezéssel, Péter Gábor írta: > > 2016-01-17 14:00 keltezéssel, Juha Manninen írta: >> There is a patch from Howard: >> http://bugs.freepascal.org/view.php?id=29411 > > I did not notice it yet. > >> Péter, can you please look at it and maybe attach your improved patch >> to the same report. > > Okay, now I'm working on it... > -- Péter Gábor p...@freemail.hu -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] New menu designer
On 17/01/2016 13:00, Juha Manninen wrote: ... Howard, for curiosity, your patch has: LCLVersion = '1.6.0.2' The menu editor is developed in trunk 1.7. Are you using a fixex_1_6 version for editing? Juha Yes, the code I worked on was the latest trunk (well perhaps it was from the day before). The IDE I used was 1.6.0. Does this matter? Howard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Testing Unicode and Windows system codepage in Lazarus 1.6
Jürgen and taazz, The DisableUTF8RTL system indeed is a fall-back for people who cannot use the new improved UTF-8 system. The automatic encoding conversion may do tricks when you still must do explicit conversion to/from UTF-8 using the old clumsy functions. I don't know about all the issues involved. I don't plan to use it myself. It is not part of my interest. The wiki page explaining it should be improved and maintained by people who actually use the system which means Jürgen, taazz, michl and others. Now the wiki page has too few examples. My interest has been the new UTF-8 system. It works much better than I could imagine. Anybody who plans now to move their code to Lazarus 1.6, please try to isolate Windows codepage conversions into functions. UTF-8 then works automatically like magic outside of those functions. Juha -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Opening non existing files and (not) adding them to the project
On 2016-01-17 16:30, Sven Barth wrote: when I opened a non-existing file and I confirmed that I want to have it created the file was not added to project or the project's mainfile. But, isn't this how Delphi has been doing it all these years. 1) When you create a new unit, it automatically gets added to the project. 2) When you decide to save the project, you're asked whether you want to save the newly added (not saved yet) units. If not, it is removed from the project and you lose its contents. 3) If you want to exclude the newly created unit, you remove it from the project. In that case, IDE asks you whether you wish to save that file (or lose it). Do you still/really want a 'non-standard' behavior? -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Opening non existing files and (not) adding them to the project
On Sun, Jan 17, 2016 at 4:30 PM, Sven Barthwrote: > Back in 1.4.x when I opened a non-existing file and I confirmed that I want > to have it created the file was not added to project or the project's > mainfile. > [...] > Now with 1.6RC2 I noticed that such files are added to the uses clause of > the main program file and the project inspector. You cannot open a non-existing file, meaning that you cannot use the File -> Open dialog for it. There is now a "FileMustExist" or similar flag. I remember it fixed some bug but don't remember which one. IMO it is logical because you can by definition only open existing files. If a file does not exist, you must create it instead. The right fix could be to ask if a newly created file should be added to project which means useless questions for most people. Or, maybe the best way is to create a file somewhere else (editor, file manager, cmd line etc), then open it. Even an empty file can be opened. Juha -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Docking search results
Am 17.01.2016 17:43 schrieb "Ondrej Pokorny": > > On 17.01.2016 16:46, Sven Barth wrote: >> >> Another thing I noticed in 1.6RC2: I can't dock the search results window anymore. Does anyone know whether this is on purpose and if yes why? > > > http://mantis.freepascal.org/view.php?id=29320 Ah, thanks. Will the reversal also be part of the final 1.6? Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] New menu designer
On 17/01/2016 18:40, Péter Gábor wrote: I think we can use one resourcestring ('') instead of three: ''; ''; ''; Yes or No? Yes, I agree with you. Howard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Docking search results
On 17.01.2016 19:09, Sven Barth wrote: > http://mantis.freepascal.org/view.php?id=29320 Ah, thanks. Will the reversal also be part of the final 1.6? For that there is another link :) http://wiki.freepascal.org/Lazarus_1.6_fixes_branch#Merged_revisions_for_1.6_RC2 (IIRC, the link is also in the official announcement.) Ondrej -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Docking search results
On 17.01.2016 19:29, Juha Manninen wrote: It is opened if it was left open when Lazarus was closed previously. No, it is not. It is opened if you saved your desktop with search result dialog opened. If you saved your desktop with search result dialog closed, it won't be opened. If you have enabled "auto save desktop" option and you close the IDE with search result dialog opened, of course it is opened the next time. This is correct behaviour. Do not change it!!! E.g. some people want the search result dialog have docked or opened by default. Why do you want a special treatment for the search result dialog? Ondrej -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Docking search results
I agree with Ondrej. I will be always be using docking using both anchor docking and the docked designer. I suspect most others people will as well, given that they're available and function correctly. Personally, I prefer to have the message window and search results docked at the bottom all the time, but even if that weren't the case I don't think special rules should be applied to the search results window. If am running an undocked environment and I want search results opened all the time, then that's my preference. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] MouseAndKeyInput package and scroll up/down with whell button
On Sun, Jan 17, 2016 at 12:37 AM, silvioprogwrote: [...] > So, I think that MouseAndKeyInput package should implement the scroll > support (triggered via up/down whell button). > Patch sent to: http://bugs.freepascal.org/view.php?id=29437. -- Silvio Clécio -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Opening non existing files and (not) adding them to the project
On Sun, 17 Jan 2016 23:34:58 +0200 Juha Manninenwrote: >[...] > You cannot open a non-existing file, meaning that you cannot use the > File -> Open dialog for it. There is now a "FileMustExist" or similar > flag. I remember it fixed some bug but don't remember which one. That would be a regression. It is one of the oldest features of the IDE. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Web vs desktop development
On 2016-01-17 09:03, ListMember wrote: > Elevate Web Builder seems to fit your > definition of "proper". > > Have you looked at it? I've heard of it, but never looked at it. Somehow I've been pretty "lucky" [wink] to avoid most things related to web development (Javascript, AJAX, etc). I do like what I've seen regarding AngularJS though - but probably because that is a lot more like how I design desktop software. :) Regards, - Graeme - -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Web vs desktop development
On 2016-01-16 12:56, Jürgen Hestermann wrote: > But todays web pages use scripting more and more (which I mostly block > with NoScript). In this case I would download and run code with each and > every click. In terms of security this is a nightmare! +1 The other day I disabled Javascript in my web browser for a day or two to see how much of websites are still usable. I noticed two things: 1. Most websites are unusable without Javascript (so why do web browsers still bother with giving the option to disable it). 2. The websites loaded magnitudes faster - it was as if I was back in 1994! :) This was because they couldn't inject more JS scripts from external domains (eg: ads, remote JS & CSS servers etc). So only a single HTML page was downloaded and whatever local images was referenced - anything that required JS to load simply didn't happen. Even though I have quite a fast Internet connection, I really like what I noticed in (2) above. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] New menu designer
16.01.2016 1:19, Howard пишет: I have submitted a patch (29411) which I hope addresses these issues, except for the issue: 'String "composing" is still present ... in main menu creation form in "add menu item" fields captions' I am not clear about which string(s) you are identifying here. Can you give a specific line number in the source that exemplifies the problem you see? Please see attached screenshots. -- Best regards, Maxim Ganetsky mailto:gan...@narod.ru -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Can I build a Lazarus GUI program only with fpc installed?
On 2016-01-17 08:09, Bo Berglund wrote: > If I install only fpc is it then possible to build a GUI program from > sources without also installing Lazarus (on Linux target)? Of course it is - as long as you have all the dependencies installed too, and if you application is LCL based, you obviously need the LCL sources too. I have done that before on a Linux build server, and recently I have used MSEide to manage and build LCL based applications (all without lazbuild or a Lazarus IDE executable around). The list of source paths (for building LCL) was large, but very doable. MSEide made this a bit easier with its support for path macros and quick setup of unit and include path setup. But if you are going to use purely FPC from the command line, I would create a config (text) file that holds all the compiler parameters - one parameter per line, then compile your project as follows: fpc @extrafpc.cfg myproject.lpr Another option would be to use FPC's fpmake.pp functionality. I don't know if Lazarus includes such a file already. Otherwise take a look at fpGUI's sources (/src/fpmake.pp) for a working example. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Web vs desktop development
On 2016-01-15 19:15, Anthony Walter wrote: > Installing software on Windows has gotten so bad > with so many download sites or software producers bundling adware, or even > spyway and malware. When I still used Windows, I *never* installed software from general download sites (eg: CNet, Softpedia, PCWorld etc). I *always* downloaded any Windows software directly from the maker's website. This at least reduced chances of adware, spyware etc. But now I only use FreeBSD and 99.9% of the software I use is all open source and compiled by myself. So the problem of spyware or adware is moot here. ;-) Regards, - Graeme - -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] New menu designer. which style do you prefer?
On 17.01.2016 0:11, Howard wrote: In this particular instance of deleting a submenu (not just a single item) my motivation was not to make it overly complicated (though I appreciate it may seem so). It is quite possible a user may have spent 10 minutes designing a submenu with half a dozen items, and then hits the delete key accidentally. With a simple Yes/No dialog (especially if the the default button is Yes) it is all to easy to hit the wrong button and lose the last few minutes' work; and there is no undo facility implemented. I may have written that dialog clumsily, but I wanted to avoid the possibility of an 'automatic' response which was disastrous. I quite agree a straightforward Yes/No dialog is simpler and more elegant, but it may not give a hurried user sufficient 'pause' to avoid accidentally losing valuable work. IMO we shouldn't think people don't know what they are doing. If I hit DELETE on a menu item, I usually want to delete it :) You'll realise I'm on a learning curve. This is my first significant code contribution to an open source project. I actually never thought I had the skill to offer a new menueditor. It was a forum comment by the late BigChimp some years ago about the previous menueditor which first got me thinking about its shortcomings, why it was so difficult to improve/maintain, and how a replacement might be designed to be better in that respect; and several developers said a complete rewrite was the only way forward. Months became years and no one as far as I could see was working on a replacement. So I decided to bite the bullet, and started to look at relevant bits of the IDE code (much of which I still don't understand). I've been learning on the job, as you plainly see... I agree! +1. Ondrej -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Web vs desktop development
On Sun, 17 Jan 2016, ListMember wrote: On 2016-01-17 03:10, Graeme Geldenhuys wrote: Consider me old school, or a traditionalist, but give me a "proper" programming language (Object Pascal and Java springs to mind), a compiler, debugger and desktop software. Though not free or open source, Elevate Web Builder seems to fit your definition of "proper". Or http://smartmobilestudio.com/ Is also a good contender. http://www.morfik.com/ Was, however, the very first to do all this. They also own the patents involved. all products are in violation of the Delphi license which states that you cannot use it to create a competing product, I would think :-) Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Can I build a Lazarus GUI program only with fpc installed?
At a minimum for lcl graphics form applications you need the lcl and lazbuild installed, as well as a valid set of config files, all of which are included with Lazarus. If you want to build just using fpc, then you'll need to gather at least those pieces together, and the easiest way to do that is to install Lazarus. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Web vs desktop development
On 2016-01-17 03:10, Graeme Geldenhuys wrote: Consider me old school, or a traditionalist, but give me a "proper" programming language (Object Pascal and Java springs to mind), a compiler, debugger and desktop software. Though not free or open source, Elevate Web Builder seems to fit your definition of "proper". Have you looked at it? If so, I'd really like to herar/read your take. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Video: Fixing anchor docking previews on OSX
Problem: On Macintosh the anchor docking system doesn't provide a preview window, making arranging docked layouts on OSX cumbersome to say the least. I think this issue is going to become more important as work progresses on anchor docking and the sparta docked form designer. Video detailing my solution: http://cache.getlazarus.org/videos/docking-preview.mp4 I put this solution video form because I think a good chunk of code can be removed from the LCL. Using a tiny bit piece of universal code rather than many larger different implementations for each widgetset seem desirable to me. But, the Controls and Forms units need a minor alteration, which might possibly be something some or the key Lazarus developers resist. Maybe the my stub procedure could be better placed/organized. You decide. The issue with patch has been filed here: http://mantis.freepascal.org/view.php?id=29426 -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Web vs desktop development
On Sun, 17 Jan 2016, ListMember wrote: On 2016-01-17 12:04, Michael Van Canneyt wrote: On Sun, 17 Jan 2016, ListMember wrote: Though not free or open source, Elevate Web Builder seems to fit your definition of "proper". Or http://smartmobilestudio.com/ Is also a good contender. I hadn't heard of this one. http://www.morfik.com/ Was, however, the very first to do all this. They also own the patents involved. I have been aware of Morfik for a long time. I seem to remember finding something about it (was it their license, or their business model; I can't remember now) off-putting. I am glad that it is around, though. IMHO: The problem with all of these tools is that they force a widgetset on you. The ideal tool, as I see it, presents you with an IDE that has an option to use their widgetset, but that also allows you to use other widgetsets, such as Angular, React, extjs, dojo, qooxdoo etc. Currently, they are all pretty closed environments. all products are in violation of the Delphi license which states that you cannot use it to create a competing product, I would think :-) 'Competing product' is a very broad area. If one goes that route, even FastMM4 could be considered to have violated it. True, but an IDE that uses Object Pascal as the language is a close match, by all standards, although probably a lawyer could squeeze himself out of it... Anyway, my comment was not meant seriously :-) Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] New menu designer. which style do you prefer?
On Sun, Jan 17, 2016 at 1:11 AM, Howardwrote: > You'll realise I'm on a learning curve. This is my first significant code > contribution to an open source project. I actually never thought I had the > skill to offer a new menueditor. It was a forum comment by the late > BigChimp some years ago about the previous menueditor which first got me > thinking about its shortcomings, why it was so difficult to > improve/maintain, and how a replacement might be designed to be better in > that respect; and several developers said a complete rewrite was the only > way forward. Months became years and no one as far as I could see was > working on a replacement. So I decided to bite the bullet, and started to > look at relevant bits of the IDE code (much of which I still don't > understand). I've been learning on the job, as you plainly see... > Talking about BigChimp, there is an open bug report from him: http://bugs.freepascal.org/view.php?id=25457 I think it can be resolved already. He may have confused Name and Caption. The visible property is Caption and the WYSIWYG editor must modify it, which it now does. Other properties should be left for Object Inspector. The KISS principle applies here, too. Anyway we have a good situation now as many people work on the menu designer. At least its structure allows it to be modified. The old menu designer was weird. Many people tried to improve it but finally gave up and noted that it should be rewritten. Usually I can refactor code to make it more modular and easier to maintain but with that code I didn't know how. So yes, this had to be done. I believe after some initial pain we get a good menu designer. Juha -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] New menu designer
I found some Format calls that seems to be unneded: the first parameter for them contains only formatting symbols and the second an array of resourcestrings. If no one else is currently working on the resourcestrings issue I will try to finish my patch and post it on mantis... This is more simpler than writing a lot of letter about what and how to fix to be translation friendly. Do you agree? 2016-01-15 23:19 keltezéssel, Howard írta: > On 14/01/2016 23:27, Maxim Ganetsky wrote: >> String "composing" is still present e. g. in "Insert from template" >> dialog ("Choose template to ..." groupbox caption) and in main menu >> creation form in "add menu item" fields captions. >> >> Also lismenueditororclickheadertosortbythatcolumn string looks >> suspicious from this POV. >> >> As for lismenueditormoveseparatedeleteinsertitems: you shouldn't try >> to align text with buttons this way. It won't work with other than >> Windows' fonts/font sizes (e.g. on Linux) and other languages. Better >> change this string to regular caption like "Menu Item actions". >> >> Also I noticed that e. g. "Insert from template" dialog is not >> resizable. It is better to have resizable dialogs in order to fit >> longer translation captions (e. g. combobox caption in this case). > > I have submitted a patch (29411) which I hope addresses these issues, > except for the issue: > 'String "composing" is still present ... in main menu creation form in > "add menu item" fields captions' > > I am not clear about which string(s) you are identifying here. Can you > give a specific line number in the source that exemplifies the problem > you see? > > Howard > > > > -- > ___ > Lazarus mailing list > Lazarus@lists.lazarus.freepascal.org > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > > -- Péter Gábor p...@freemail.hu -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Testing Unicode and Windows system codepage in Lazarus 1.6
Am 2016-01-17 um 12:34 schrieb Juha Manninen: > LCL continues to work as before when you define "DisableUTF8RTL". Then > AnsiString is coded with the system codepage by default. The UTF-8 > conversion functions still work. You may have a false impression of how Free Pascal/Lazarus is used by most people. At least I did not wait until the current version to use Unicode (and long paths) for file names and others. I think many did so. Therefore we have build our own infrastructure/functions to work with the Windows unicode API functions. In this case using "DisableUTF8RTL" would be no option as it bombs us back to ANSI/short paths and still requires to do code changes. That's not good. So we need to live with the changes and understand the logic behind it (which IMO is much more complicated than before). The amount of time we have to invest is unforseeable for us and therefore many get frustrated (especially, because the documentation is poor). I have done the changes to (some) of my programs now and it works quite okay but it was a hard time until this was finished (and I still don't know whether bugs lurk here and there). > I don't know why you always find excuses to complain. It is not nice. > Please stop it. Please stop ignoring and gibing those who have problems with the new unicode types. I know how they feel and such statements are not helpful. If you don't want to help then ignore these mails. I know that those who have already worked on this for a long time cannot understand why not everybody instantly knows how the new codepage aware ansistrings work but be assured that for many this is completely new. So bare with our frustration and better ignore such mails than revile the writers. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] New menu designer
On Sun, Jan 17, 2016 at 2:33 PM, Péter Gáborwrote: > If no one else is currently working on the resourcestrings issue I will > try to finish my patch and post it on mantis... > This is more simpler than writing a lot of letter about what and how to > fix to be translation friendly. > > Do you agree? There is a patch from Howard: http://bugs.freepascal.org/view.php?id=29411 Actually I thought somebody else will take care of it. Now I assigned it to myself. Péter, can you please look at it and maybe attach your improved patch to the same report. Howard, for curiosity, your patch has: LCLVersion = '1.6.0.2' The menu editor is developed in trunk 1.7. Are you using a fixex_1_6 version for editing? Juha -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Building GUI program for RPi1 on RPi2?
On Sat, 16 Jan 2016 13:45:26 +, Mark Morgan Lloydwrote: >So in my opinion using an older RPi is a false economy here. You are absolutely correct! I bit the bullet today and bought an RPi2B instead and within short I was in business with the already compiled program running well and I could concentrate on the fine details like disabling the screen saver and such. Now we are heading out to the care home where my mother-in-law spends her last time with a working text communication device. No more Windows -- Bo Berglund Developer in Sweden -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] FileExistsUTF8 and long paths
Am 2016-01-17 um 12:42 schrieb Bart: > On 1/16/16, Jürgen Hestermannwrote: >> Well, at least when the path is too long (length(FileName>MAXPATH)) >> it can prepend \\?\ because it will fail without it anyway. > That won't do for the same reasons as explained above. > Say you have a directory: c:\maxpathchars\1\2\3\ > Now cehcking for ..\..\foobar will still fail if > c:\maxpathchars\1\foorbar exists, unless you have a folder in > c:\maxpathchars\1\2\3\ that actually has the name '..' etc. > I.o.w expanding the filename cannot be done anymore. Yes, that's true. Additional checks (i.e. for dots) are needed but I think it should be possible to find out when a path is: 1. not relative and 2. without forward slashes and 3. too long to be resolved without prepended \\?\ so that adding \\?\ would make the request successful when it otherwise would fail. > Note that even Windows itself (at least windows explorer) cannot handle this. Windows (the API) *can* handle this, only explorer can't. I have written a file manager that has no problem to copy/move/rename etc. files with paths of arbitrary length. Of course, many special things (like deleting to recycle bin and setting current directory) do not work with such long paths, but at least those things that work should be made functional. > I once unzipped a file with such a filename (produced on linux of course). > It unzipped well and FileexistsUtf8('\\?\realfilename) worked well. > (Testing this was the reason I did this.) > After that windows was unable to remove the file in question. > I tried various tools for that, icluding rm - R *. > No such luck. It seems that the unzip tool you used *was* able to handle long paths. In such cases you can use more appropiate file managers like Total Commander or Ztree that have larger limits than 255 (but still Ztree has a limit of 400 and Total commander of 1000 character which I don't understand). When using the W functions the limit is near 32000 so why don't they all support this? Strange. > To me it looks like a rather odd design desicion by MS have a MAXPATH > but then have obscure ways to circumvent that. Yes, again it is very bad design from MS that all (Windows users) have to live with. But we should not make it worse than it already is. So if the W functions support long paths we should support this too. > AFACS it cannot be resolved/fixed in a manner that will not break > backwards compatibility. I think it is possible (see above). You only need to find out the exact limitations and detect them before adding \\?\ > Further more: this is not something that belongs to Lazarus, but to fpc. I am not sure. I thought FileExistsUTF8 is part of Lazarus, not Free Pascal. >> I did not find any comments that mentions long paths > You need new glasses then ;-) > === code == > //if Filename uses ExtendedLengthPath scheme then it cannot be expanded > //AND it should not be altered by ForcePathDelims or ResolveDots > //See: http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx > if (Length(Fn) > 3) and (Fn[1] = PathDelim) and (Fn[2] = PathDelim) and > (Fn[3] = '?') and (Fn[4] = PathDelim) //Do NOT use > AllowDirectorySeparators here! > then Exit; > === end code === I have read this but how is this related to \\?\ and long paths? What is ExtendedLengthPath scheme? I don't see any information about W functions and \\?\ prefix. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] FileExistsUTF8 and long paths
Am 2016-01-17 um 14:23 schrieb Jürgen Hestermann: > Additional checks (i.e. for dots) are needed > but I think it should be possible to find out > when a path is: > 1. not relative and > 2. without forward slashes and > 3. too long to be resolved without prepended \\?\ Even better would be to do the expansion of relative paths internally before handing it over to the Windows API so that they even work when Windows would fail. The same applies to forward slashes. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] FileExistsUTF8 and long paths
Am 17.01.2016 14:23 schrieb "Jürgen Hestermann": > >> I did not find any comments that mentions long paths > > You need new glasses then ;-) > > === code == > > //if Filename uses ExtendedLengthPath scheme then it cannot be expanded > > //AND it should not be altered by ForcePathDelims or ResolveDots > > //See: http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx > > if (Length(Fn) > 3) and (Fn[1] = PathDelim) and (Fn[2] = PathDelim) and > > (Fn[3] = '?') and (Fn[4] = PathDelim) //Do NOT use > > AllowDirectorySeparators here! > > then Exit; > > === end code === > > I have read this but how is this related to \\?\ and long paths? > What is ExtendedLengthPath scheme? > I don't see any information about W functions and \\?\ prefix. Did you look at the if-clause following the comment? What do you think PathDelim + PathDelim + '?' + PathDelim evaluates to? Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] FileExistsUTF8 and long paths
Am 17.01.2016 12:42 schrieb "Bart": > In the end I used a bootable linux dvd (puppy linux), mounted the > partition in question and used the filemanger from that distro to > remove the folder and file. You know that you could just have written a program that uses the *W API to delete files with a \\?\ prefixed path? ;) Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Can I build a Lazarus GUI program only with fpc installed?
If I install only fpc is it then possible to build a GUI program from sources without also installing Lazarus (on Linux target)? Say that I have a simple GUI program that is imported in Lazarus from Delphi7 by using the import tool in Lazarus on a Linux platform. It builds and runs OK on that platform. Then I have a need to compile on another linux platform (different CPU etc) but do not want to/am able to install Lazarus there but fpc is available. Can I transfer the sources to that platform and then build on the command line somehow? I have tried to find info on this on the web but what I find is very condensed and hard to understand The steps I thought of would be something like this: apt-get install fpc apt-get install (long list of dependencies for lazarus) transfer sources (5-10 files) to ~/projects/code cd ~/projects/code issue command to build program But what would that command look like? Or is lazarus necessary to build a fpc GUI program (as opposed to a command line program)? I have seen talk about the fpc.conf file used to set some options, but there is a global such file in /etc and I do not see how one must change that for each project to build... Whatever needed as source info should be in the project dir or on the command line, right? Or can a makefile be generated in the system where the program is created and used on the target system without Lazarus? If so, how? -- Bo Berglund Developer in Sweden -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Web vs desktop development
On 2016-01-17 12:04, Michael Van Canneyt wrote: On Sun, 17 Jan 2016, ListMember wrote: Though not free or open source, Elevate Web Builder seems to fit your definition of "proper". Or http://smartmobilestudio.com/ Is also a good contender. I hadn't heard of this one. http://www.morfik.com/ Was, however, the very first to do all this. They also own the patents involved. I have been aware of Morfik for a long time. I seem to remember finding something about it (was it their license, or their business model; I can't remember now) off-putting. I am glad that it is around, though. all products are in violation of the Delphi license which states that you cannot use it to create a competing product, I would think :-) 'Competing product' is a very broad area. If one goes that route, even FastMM4 could be considered to have violated it. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Testing Unicode and Windows system codepage in Lazarus 1.6
The RC1 and RC2 versions have been tested for a while now but we have not heard any complaints about the new improved Unicode support. Does that mean it works perfectly? Windows is of biggest interest. There the new UTF-8 support breaks existing code when it depends on system codepage. For that reason LCL can also be used without the new UTF-8 support by defining "DisableUTF8RTL". The relevant wiki pages: http://wiki.freepascal.org/Better_Unicode_Support_in_Lazarus http://wiki.freepascal.org/Lazarus_with_FPC3.0_without_UTF-8_mode Feedback please. This is from taazz, copied from the "New menu designer" thread: On Sun, Jan 17, 2016 at 5:35 AM, taazzwrote: > Well I'm stuck on lazarus 1.4.4 for the foreseeable future mostly because > 1.6 made a pretty aggressive jump to utf8 and I do not have the time nor the > inclination to retest every line of code that I have based on unicodestring > and widestring and partly because testing new lazarus versions gets longer > and longer each year. So I'm going to change the old one to fit my needs, > although I like the look and feel of the new one. LCL continues to work as before when you define "DisableUTF8RTL". Then AnsiString is coded with the system codepage by default. The UTF-8 conversion functions still work. Supporting this backwards compatible mode became a high priority because you and some others expressed concerns about the default UTF-8 encoding. Are you saying you will not even test the "DisableUTF8RTL" mode? Its known bugs were fixed already. More feedback would be nice. If you still decide to use FPC 2.6.4, you can do it with Lazarus 1.6. It will be compatible for the life-cycle of 1.6.x. Then AnsiString is 100% compatible with Lazarus 1.4.4 (obviously). See, you can freely choose the best combination. I don't know why you always find excuses to complain. It is not nice. Please stop it. Juha -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] FileExistsUTF8 and long paths
On 1/16/16, Jürgen Hestermannwrote: > Well, at least when the path is too long (length(FileName>MAXPATH)) > it can prepend \\?\ because it will fail without it anyway. That won't do for the same reasons as explained above. Say you have a directory: c:\maxpathchars\1\2\3\ Now cehcking for ..\..\foobar will still fail if c:\maxpathchars\1\foorbar exists, unless you have a folder in c:\maxpathchars\1\2\3\ that actually has the name '..' etc. I.o.w expanding the filename cannot be done anymore. Note that even Windows itself (at least windows explorer) cannot handle this. I once unzipped a file with such a filename (produced on linux of course). It unzipped well and FileexistsUtf8('\\?\realfilename) worked well. (Testing this was the reason I did this.) After that windows was unable to remove the file in question. I tried various tools for that, icluding rm - R *. No such luck. In the end I used a bootable linux dvd (puppy linux), mounted the partition in question and used the filemanger from that distro to remove the folder and file. To me it looks like a rather odd design desicion by MS have a MAXPATH but then have obscure ways to circumvent that. AFACS it cannot be resolved/fixed in a manner that will not break backwards compatibility. Further more: this is not something that belongs to Lazarus, but to fpc. > I did not find any comments that mentions long paths You need new glasses then ;-) === code == //if Filename uses ExtendedLengthPath scheme then it cannot be expanded //AND it should not be altered by ForcePathDelims or ResolveDots //See: http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx if (Length(Fn) > 3) and (Fn[1] = PathDelim) and (Fn[2] = PathDelim) and (Fn[3] = '?') and (Fn[4] = PathDelim) //Do NOT use AllowDirectorySeparators here! then Exit; === end code === Bart -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] IDE Coolbar and its default after updating
Hello together! Today I updated my Lazarus from 1.4.4 to 1.6RC2 and while reporting some bugs (not specific to the RC2, but general ones), I noticed that the toolbar buttons ("open", "save", etc.) were missing. Thinking first that my docking settings were messed up again I checked those, but they were okay. Then I noticed the IDE Coolbar settings and that it's switched off. Switching it on brought the buttons back, but I wonder whether it's a good idea to have this as "default off" after an upgrade... (OS: Windows 10) Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Testing Unicode and Windows system codepage in Lazarus 1.6
On Sun, Jan 17, 2016 at 2:54 PM, Jürgen Hestermannwrote: > You may have a false impression of how Free Pascal/Lazarus is used by most > people. > At least I did not wait until the current version to use Unicode (and long > paths) > for file names and others. I think many did so. > Therefore we have build our own infrastructure/functions to work with the > Windows unicode API functions. In this case using "DisableUTF8RTL" would > be no option as it bombs us back to ANSI/short paths and still requires to > do code changes. > That's not good. I don't understand how DisableUTF8RTL bombs your system because it is the backwards compatible thing. If your system worked with FPC 2.6.4, it should work with FPC 3.0 + DisableUTF8RTL. If it does not work then there are bugs which should be fixed. Do you mean the A- / W- versions of WinAPI calls by the short/long path thing? Enabling or disabling the UTF8RTL does not affect WinAPI calls. It is a separate issue. > So we need to live with the changes and understand the logic behind it > (which IMO is much more complicated than before). The amount of time we have > to invest > is unforseeable for us and therefore many get frustrated (especially, > because the documentation is poor). > > I have done the changes to (some) of my programs now and it works quite okay > but it was a hard time until this was finished (and I still don't know > whether bugs lurk here and there). > > >> I don't know why you always find excuses to complain. It is not nice. >> Please stop it. > > Please stop ignoring and gibing those who have problems with the new unicode > types. > I know how they feel and such statements are not helpful. > If you don't want to help then ignore these mails. Excuse me! Are you really saying I have not helped with the Unicode issues? I am amazed the system works already as well as it does. > I know that those who have already worked on this for a long time > cannot understand why not everybody instantly knows how the new > codepage aware ansistrings work but be assured that for many this is > completely new. So bare with our frustration and better ignore such > mails than revile the writers. In my mail I explicitly asked for feedback so we can still improve this system. Yes, this is a very complicated issue. For example I am at my limits of understanding / not-understanding the details, but still I tried to improve things instead of complaining about how poorly the voluntary developers have done the job. I have worked on the DisableUTF8RTL feature although I don't use it myself. Fortunately there were helpful people like "michl" (forum name) who fixed bugs. I also wrote some wiki pages. They are not perfect but they are better than nothing. Now we support 3 ways with Lazarus 1.6 : 1. The improved UTF-8 system with FPC 3.0. The default codepage of AnsiString = UTF-8. 2. Backwards compatible system with FPC 3.0 by defining DisableUTF8RTL. AnsiString uses system codepage. 3. Continue using FPC 2.6.4. All string types and encodings are 100% compatible with earlier versions. The 4. way will be a Delphi compatible UTF-16 sometime in future. How to improve the 3 supported ways? The issues I know are that FPC libs still use the old WinAPI calls in some places, and the TFormatSettings separators issue. Are there other bugs? How to solve them? Juha -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] FileExistsUTF8 and long paths
On 1/17/16, Sven Barthwrote: > > You know that you could just have written a program that uses the *W API to > delete files with a \\?\ prefixed path? ;) I did that, and id did not work. Probably because I did something wrong. To be honest, I then removed the file using a linux live dvd, at a time when I booted that up for an entriley different reason. Bart -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] FileExistsUTF8 and long paths
On 1/17/16, Jürgen Hestermannwrote: > > AFACS it cannot be resolved/fixed in a manner that will not break > > backwards compatibility. > > I think it is possible (see above). > You only need to find out the exact limitations and detect them before > adding \\?\ Only if we decide to _always_ try that (under specified circumstances). If not it will be an optional parameter and the function then will have a different signature, which will be incompatible with existing programs using it as a function variable. >> Further more: this is not something that belongs to Lazarus, but to fpc. > I am not sure. I thought FileExistsUTF8 is part of Lazarus, not Free Pascal. The only difference between File* and File*UTF8 functions (fpc<->Lazarus) is that the UTF8 versions were/are able to handle any unicodecharacter inside the given path/filename (regardless of you current Windows codepage). Otherwise it does not behave different compared to the fpc File* functions, nor should it. Bart -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Raspberry Pi bundles now available
Bo Berglund wrote: Second posting of this, first one seems to have disappeared... On Sun, 6 Dec 2015 22:18:09 -0500, Anthony Walterwrote: Another, possibly more useful bundle I've created is Free Pascal 3.0 with Lazarus for the Raspberry Pi. I've taken great care to reduce the install size of both fpc and Lazarus with this bundle for the Pi. If you're interested in trying this version of Free Pascal 3.0 with Lazarus, here is where you can get it: http://www.getlazarus.org/setup/?download#raspberry_pi If you have a Pi, just follow the instructions in the setup script. You can choose your install folder and have the option to creaate a application shortcut you can pin to the Pi menu, Hi, I need a working lazarus on a RPi1B 256MB in order to compile a simple program that I have converted from Delphi7 on an RPi2B. On the RPi2B it works just fine but if I transfer it to the RPi1B it causes an exception on start. I guess it is because some hardware option has been compiled into it on the RPi2B. So I need to compile on the actual hardware... Are you running exactly the same OS on both RPi2b and RPi1b? New raspbian OS has something called device tree that was not present in old raspbian. That could interact differently to your program. Dennis -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] FileExistsUTF8 and long paths
On 1/17/16, Jürgen Hestermannwrote: > >> I did not find any comments that mentions long paths > > You need new glasses then ;-) > > === code == > > //if Filename uses ExtendedLengthPath scheme then it cannot be expanded > > //AND it should not be altered by ForcePathDelims or ResolveDots > > //See: > http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx > > if (Length(Fn) > 3) and (Fn[1] = PathDelim) and (Fn[2] = PathDelim) and > > (Fn[3] = '?') and (Fn[4] = PathDelim) //Do NOT use > > AllowDirectorySeparators here! > > then Exit; > > === end code === > > I have read this but how is this related to \\?\ and long paths? > What is ExtendedLengthPath scheme? > I don't see any information about W functions and \\?\ prefix. > Quoted from the link: "To specify an extended-length path, use the "\\?\" prefix. For example, "\\?\D:\very long path"." Maybe you need new eyes, not new glasses ;-) Bart -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Opening non existing files and (not) adding them to the project
Hello together! Working with 1.6RC2 I noticed a - for me - very serious problem and wonder whether I've missed some option. Back in 1.4.x when I opened a non-existing file and I confirmed that I want to have it created the file was not added to project or the project's mainfile. This is wonderful and I use it to quickly create testcases for the compiler (which don't need their own project and are compiled from the command line or from the compiler running debugged in the IDE anyway). Now with 1.6RC2 I noticed that such files are added to the uses clause of the main program file and the project inspector. Is there some option I have missed to change this behavior? Because not only meeses this up the compiler project, but CodeTools don't like it as well as the files I add this way are usually program files, thus they shouldn't be in the uses section anyway. If there isn't the this should be changed preferably before the release of 1.6 as otherwise that version will be useless for me (or I'll have to patch out that code myself). Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Docking search results
Helle together! Another thing I noticed in 1.6RC2: I can't dock the search results window anymore. Does anyone know whether this is on purpose and if yes why? Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] FileExistsUTF8 and long paths
Am 2016-01-17 um 15:25 schrieb Bart: > Quoted from the link: > "To specify an extended-length path, use the "\\?\" prefix. For > example, "\\?\D:\very long path"." > Maybe you need new eyes, not new glasses ;-) I know the Windows API specification very well. But you seem to forget the original thread. I asked: > Why not prepend "\\?\" at this last Windows step so it works for long paths to which you answered: > This will break existing programs, including the ide. > Currently you can use both / and \ in filenames on Wndows filename > functions, because the API does not care. > That is unlues you prepend \\?\, then character in the given string > MUST be in the filename. > Also this will then return false on '..\foo.bar', sincenow te APi > expects that the two dots are part of the filename. > See the comments in ExpandFilenameUTF8 (I think I put a reference there). How does the comment bring any new facts to the discussion? It just repeats the text you wrote before. I expected more information in the comment which I did not find. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] FileExistsUTF8 and long paths
On 1/17/16, Jürgen Hestermannwrote: > How does the comment bring any new facts to the discussion? > It just repeats the text you wrote before. > I expected more information in the comment which I did not find. We seem to misunderstand eachther, or at least I do so. Bart -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] New menu designer
2016-01-17 14:00 keltezéssel, Juha Manninen írta: > There is a patch from Howard: > http://bugs.freepascal.org/view.php?id=29411 I did not notice it yet. > Péter, can you please look at it and maybe attach your improved patch > to the same report. Okay, now I'm working on it... -- Péter Gábor p...@freemail.hu -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] FileExistsUTF8 and long paths
Am 2016-01-17 um 15:39 schrieb Bart: >> > AFACS it cannot be resolved/fixed in a manner that will not break >> > backwards compatibility. >> I think it is possible (see above). >> You only need to find out the exact limitations and detect them before >> adding \\?\ > Only if we decide to _always_ try that (under specified circumstances). > If not it will be an optional parameter and the function then will > have a different signature, which will be incompatible with existing > programs using it as a function variable. If you check for \\?\ (which is already done), detect (or even expand) relative paths and detect slashes (or even convert them to backslashes) then no backward compatibility would be broken. No drawback but the advantage of no failure for long paths. >>> Further more: this is not something that belongs to Lazarus, but to fpc. >> I am not sure. I thought FileExistsUTF8 is part of Lazarus, not Free Pascal. > The only difference between File* and File*UTF8 functions > (fpc<->Lazarus) is that the UTF8 versions were/are able to handle any > unicodecharacter inside the given path/filename (regardless of you > current Windows codepage). > Otherwise it does not behave different compared to the fpc File* > functions, nor should it. Still the original function I mentioned was from Lazarus. Therefore I wrote this to the Lazarus forum. Otherwise I would have been blamed for not using the right forum. ;-) BTW: The following code in ExpandFileNameUtf8 seems to be not quite correct: if (Length(Fn) > 3) and (Fn[1] = PathDelim) and (Fn[2] = PathDelim) and (Fn[3] = '?') and (Fn[4] = PathDelim) //Do NOT use AllowDirectorySeparators here! then Exit; When PathDelim='/' it would make no sense. Only Windows has the '\\?\' prefix and as far as I know it cannot be '//?/'. For Linux this maybe a valid file/directory name (but I don't know). -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] FileExistsUTF8 and long paths
On 1/17/16, Jürgen Hestermannwrote: > BTW: > The following code in ExpandFileNameUtf8 seems to be not quite correct: > > if (Length(Fn) > 3) and (Fn[1] = PathDelim) and (Fn[2] = PathDelim) and > (Fn[3] = '?') and (Fn[4] = PathDelim) //Do NOT use > AllowDirectorySeparators here! > then Exit; > > When PathDelim='/' it would make no sense. You are wrong. The code in question is in a includefile that is only included under Windows, where PathDelim = DirectorySeparator = '\', always (it's a constant). The filename should have been a clue here (as is the include direcory of it's main unit file): ($lazarus)\components\lazutils\winlazfileutils.inc. I just preferred writing PathDelim when I wrote that piece of code. Bart -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] FileExistsUTF8 and long paths
On 1/17/16, Bartwrote: > include direcory Read: "include directive" Bart -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Docking search results
On 17.01.2016 16:46, Sven Barth wrote: Another thing I noticed in 1.6RC2: I can't dock the search results window anymore. Does anyone know whether this is on purpose and if yes why? http://mantis.freepascal.org/view.php?id=29320 Ondrej -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Docking search results
On 17.01.2016 17:43, Ondrej Pokorny wrote: On 17.01.2016 16:46, Sven Barth wrote: Another thing I noticed in 1.6RC2: I can't dock the search results window anymore. Does anyone know whether this is on purpose and if yes why? http://mantis.freepascal.org/view.php?id=29320 Btw, Juha as an answer on your "The plan is to prevent the window opening initially in a non-docked IDE while still allowing its docking. I must look at it later." from the mantis issue: For me the search result dialog isn't initially opened in the undocked IDE. Tested on Windows/win32. Ondrej -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] FileExistsUTF8 and long paths
On 1/17/16, Jürgen Hestermannwrote: > Yes, that's true. > Additional checks (i.e. for dots) are needed > but I think it should be possible to find out > when a path is: > > 1. not relative and Yes. > 2. without forward slashes and But then the function would not act on \\?\C:\maxpathchars\foo/bar if you omitted the \\?\, which seems to be the intention of your proposal? Mind you that the \\?\ prefix is not only meant for the MaxPath situation. If I understood you correctly you would want to have function FileXXXUtf8(Fn) do: begin if (Length(Fn) > MaxPath) and (not StartsWith('\\?\',Fn) then FileXXXUtf8('\\?\' + Fn) else OriginalImplementationOfFileXXXUtf8() end; (With the exception of ExpandFilenameUtf8) > 3. too long to be resolved without prepended \\?\ > > so that adding \\?\ would make the request successful > when it otherwise would fail. See above. At least it would be ambigous. To me, the better solution would be that a program that must be able to handle this should prepend the prefix itself (and taking care of all relevant issues like expanding, allowing/replacing '/' with '\' etc. beforehand) and then call the FileXXXUtf8 functions on the resulting string. You, as the programmer, should know wether or not the input in your program can rely on '/' meaning "current system pathdelimiter" or not. E.g. Lazarus itself treats '/' as pathdelimiter (at least in may places), and therefore automatic use of \\?\ prefix may be dangerous (because failing would be a better option than succeding with a "strange" filename). (Or it may not be, I simply cannot tell without studying all the sources.) Bart -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Testing Unicode and Windows system codepage in Lazarus 1.6
Am 2016-01-17 um 15:19 schrieb Juha Manninen: > I don't understand how DisableUTF8RTL bombs your system because it is > the backwards compatible thing. > If your system worked with FPC 2.6.4, it should work with FPC 3.0 + > DisableUTF8RTL. Yes, you are right. DisableUTF8RTL resets *some* of the changes (those related to the API interface) and does not harm functions that already used the Win API directly. But as one example, since FPC 3.0 you cannot use UTF8Delete on UTF8Strings anymore. This requires changes to existing programs that cannot be avoided by a compiler switch. Not everybody is prepared to invest this time just now. This is no criticism of the good work that has been done to finally make the long overdue step to codepage-aware strings. Still everybody should also be aware that this is a radical change in the already complicated area of string handling and due to its complexity many FPC users experience these changes as a burden in the first place. On the long term it was unavoidable of course but just now it generates frustration. > Excuse me! Are you really saying I have not helped with the Unicode issues? No, that's not what I said. But if you got fed up with all these questions about unicode it would be better to ignore some of the mails that bother you instead of increasing the frustration of others by telling them they are just too lazy (or dumb) to read (and understand) some wikis. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Opening non existing files and (not) adding them to the project
On 1/17/16, Sven Barthwrote: > Is there some option I have missed to change this behavior? Because not > only meeses this up the compiler project, but CodeTools don't like it as > well as the files I add this way are usually program files, thus they > shouldn't be in the uses section anyway. Odd. ProjectOptions->Miscallaneous-> "Main unit has uses section containing all units of a project". Uncheck and save as default compiler options? Would have expected that to be a global setting. Bart -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Testing Unicode and Windows system codepage in Lazarus 1.6
On 1/17/16, Jürgen Hestermannwrote: > But as one example, since FPC 3.0 you cannot use UTF8Delete on UTF8Strings > anymore. Already fixed in trunk (r50850 and r50910) and merged into 1.6RC2. Please stop complaing about things that were already fixed. Bart. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus