[Lazarus] Synedit Highligter: hide found character sequence

2017-02-06 Thread Michael Schnell via Lazarus
Hi SynEdit Experts, Doing a special kind of text editor (that in fact needs to feature an invisible signature for each word in the text): Is it possible to do a highlighter that results in hiding the character sequences found by the highlighting criterion (in fact on screen replaces it by a

[Lazarus] Synedit tab

2017-02-06 Thread Michael Schnell via Lazarus
I tried to open an old project I once started to test using SynEdit. It does compile and work, but when trying to see the form I get an messages of not installed components. In fact the "sysEdit" tab that is described in the Wiki is not seen in the Lazarus IDE. How to activate it ? Thanks,

Re: [Lazarus] Synedit tab

2017-02-06 Thread Michael Schnell via Lazarus
On 06.02.2017 11:30, Ondrej Pokorny via Lazarus wrote: Check if you installed syneditdsgn package. In the "Install/Uninstall Packages" menu in the "Installed" Window there is "SynEditDsgn". But other than "SynEdit 1.0" same features a small green "+". No Idea if this is an error indication.

Re: [Lazarus] Synedit tab

2017-02-07 Thread Michael Schnell via Lazarus
On 06.02.2017 13:55, Mattias Gaertner via Lazarus wrote: The dialog is simple: left side will be installed. Yep. But if there are some that have a green cross (meaning "known" but not used/intstalled, as said SynEditDsgn claims: "Current state: selected for installation, not installed,

Re: [Lazarus] Running an app on boot

2017-01-30 Thread Michael Schnell via Lazarus
On 25.01.2017 11:40, Ed Murashie via Lazarus wrote: No matter what I try I get “ Gtk-WARNING **: cannot open display: “. This also happen on a Beaglebone What am I doing wrong and how can I fix it? Do you *want* a GUI ? -Michael -- ___ Lazarus

Re: [Lazarus] Teaching Pascal at College

2017-01-16 Thread Michael Schnell via Lazarus
On 15.01.2017 15:30, Martin Vahi via Lazarus wrote: have came to a conclusion that GUI-s are inherently something that require "dynamic programming" or the code gets really bloated. The nice thing about Lazarus "RAD" paradigm is that this is completely hidden (in the library) from application

Re: [Lazarus] Changes to fpWeb...

2017-01-16 Thread Michael Schnell via Lazarus
On 14.01.2017 15:34, Marcos Douglas B. Santos via Lazarus wrote: I'm feeling we've started to go ahead writing complex Web systems Does fpweb / weblaz already support status messages from the server to the client (or will it some day) to allow for "Rich Web Applications") ? Thanks Michael and

Re: [Lazarus] Teaching Pascal at College

2017-01-17 Thread Michael Schnell via Lazarus
On 16.01.2017 21:24, Lars via Lazarus wrote: Except when you find a bug in the lcl, and have to dig in to it.. I don't suppose Lazrus is so bad that it can't be used for the simple programs the students will start with when learning programming :-):-):-). -Michael --

Re: [Lazarus] Changes to fpWeb...

2017-01-17 Thread Michael Schnell via Lazarus
On 16.01.2017 20:19, Daniel Gaspary wrote: Can you give examples of these messages? And who (nginx, apache..?) and how they are implemented? In fact I can't, either, that is why I ask. I do know that there are several frameworks that support this by running rather complex Java script on

Re: [Lazarus] Changes to fpWeb...

2017-01-17 Thread Michael Schnell via Lazarus
On 16.01.2017 21:59, Leonardo M. Ramé via Lazarus wrote: The only framework I'm aware of implementing it is m0rm0t. What do you mean by "The only" ? The only at all (I suppose that there are several of those) or the only that explicitly supports pascal / fpc / Lazarus. (I don't know any at

Re: [Lazarus] Changes to fpWeb...

2017-01-17 Thread Michael Schnell via Lazarus
On 17.01.2017 10:27, Michael Van Canneyt wrote: There is. Look for bauglirwebsocket. It implements the websocket protocol. That is good to know ! Thanks, -Michael -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org

Re: [Lazarus] Changes to fpWeb...

2017-01-17 Thread Michael Schnell via Lazarus
On 16.01.2017 22:21, Lars via Lazarus wrote: What is the exact name of it... couldn't find it: http://blog.synopse.info/category/Open-Source-Projects/mORMot-Framework -Michael -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org

Re: [Lazarus] Teaching Pascal at College

2017-01-17 Thread Michael Schnell via Lazarus
On 17.01.2017 10:22, Graeme Geldenhuys via Lazarus wrote: Yes, Delphi's VCL is a wrapper around the common Win32 widgets. LCL is a wrapper around Win32, Qt, Cocoa, Carbon and even fpGUI. And for ease of use as well Delphi as Lazarus come with an IDE that is a combination of source code

Re: [Lazarus] TPageControl OnChange calling issue

2016-10-05 Thread Michael Schnell via Lazarus
On 05.10.2016 12:40, Ondrej Pokorny via Lazarus wrote: I am against. LCL is designed to be Delphi-compatible so the default events are what they are and they behave how they behave. This of course is granted by a property that is not existing in Delphi and defaults to the Delphi behavior.

Re: [Lazarus] Messages from who?

2016-10-04 Thread Michael Schnell via Lazarus
On 01.10.2016 14:01, DougC via Lazarus wrote: The FROM field is always the list, itself, now. Seems like a good idea. While Thunderbird has a dedicated "Reply to list" button (which I sometimes failed to hit :-( ), some other mail clients might only allow for "Reply" (unless you want

[Lazarus] WebAssembly

2016-11-09 Thread Michael Schnell via Lazarus
(Creating a new thread instead of using "Help System with Chromium Embedded component") On 09.11.2016 05:38, Lars via Lazarus wrote: On Tue, November 8, 2016 3:49 am, Michael Schnell via Lazarus wrote: On 08.11.2016 11:42, Michael Van Canneyt via Lazarus wrote: I seriously doubt

Re: [Lazarus] WebAssembly

2016-11-09 Thread Michael Schnell via Lazarus
-> https://hacks.mozilla.org/2016/10/webassembly-browser-preview/ : However, assuming no issues are found that require substantial time to address, the WebAssembly Community Group would like to mark an initial version of the standard as “done” in Q1 2017 which would then enable browsers to

Re: [Lazarus] WebAssembly

2016-11-11 Thread Michael Schnell via Lazarus
On 11.11.2016 02:26, Mattias Gaertner via Lazarus wrote: So it is not yet clear when it will be ready and how the end product will work on the various browsers. Mozilla promises "March 2017". Any information on other brands ? I only found "Microsoft says it is close to shipping the browser

Re: [Lazarus] Teaching Pascal at College

2016-10-18 Thread Michael Schnell via Lazarus
On 17.10.2016 21:05, Lars via Lazarus wrote: The big issue with teaching using a RAD tool, is welding the program logic into the onclick events, instead of decoupling the logic in separate procedures that can be reused elsewhere. As you point out in the text this is as well a pro (easy fast

Re: [Lazarus] Lazmint

2016-10-18 Thread Michael Schnell via Lazarus
Seemingly "make bigide" on a 64 Bit Mint does not work this simply with the 32 bit fpc: /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.8/crtbegin.o when searching for /usr/lib/gcc/x86_64-linux-gnu/4.8/crtbegin.o /usr/bin/ld: cannot find

Re: [Lazarus] Lazmint

2016-10-18 Thread Michael Schnell via Lazarus
So I fetched the current fpc from svn. Trying to make same I get a similar error: Linking fpmake fpmake.pp(47,1) Warning: "crti.o" not found, this will probably cause a linking failure fpmake.pp(47,1) Warning: "crtn.o" not found, this will probably cause a linking failure /usr/bin/ld:

Re: [Lazarus] Teaching Pascal at College

2016-10-14 Thread Michael Schnell via Lazarus
On 13.10.2016 10:20, Graeme Geldenhuys via Lazarus wrote: +1 That would be the best solution. GUI programming is based on fundamentals than need to be understood first. -1 !! The OP explained that his main purpose is to introduce more fun in the education. That can be done by plunging into

Re: [Lazarus] Teaching Pascal at College

2016-10-14 Thread Michael Schnell via Lazarus
On 14.10.2016 00:13, Erwin van den Bosch via Lazarus wrote: I'm not a big fan of the RAD development way any more. (I was years ago). The problem is that you should separate your business logic and the GUI. This is absolutely true especially when doing large systems or (embedded) systems

Re: [Lazarus] Teaching Pascal at College

2016-10-17 Thread Michael Schnell via Lazarus
Generally speaking: Getting confronted with the limits, imposed by lack of knowledge to your work to get a task done is a great motivation for learning. Being forced by the tutor to learn stuff you don't immediately need to get the task at hand done is a great motivation to give up.

Re: [Lazarus] Teaching Pascal at College

2016-10-17 Thread Michael Schnell via Lazarus
On 14.10.2016 16:10, Jürgen Hestermann via Lazarus wrote: In most cases they never get to the step "find out how it works". If it works, nobody wants to invest time anymore to look under the hood. So they always operate on the surface and repeat the same subobtimal programming over and over

Re: [Lazarus] Teaching Pascal at College

2016-10-25 Thread Michael Schnell via Lazarus
On 24.10.2016 18:11, Travis Ayres via Lazarus wrote: With over 100 replies, we could have already written a course outline, introduction, ... It seems we have lost (or silenced) the OP long since :-( -Michael -- ___ Lazarus mailing list

Re: [Lazarus] TThread.Synchronize

2016-10-25 Thread Michael Schnell via Lazarus
On 25.10.2016 13:21, LacaK via Lazarus wrote: My understanding is that, Synchronize schedules execution of MyForm.MyMethod to main thread, so method is not executed until control is returned from event handler in MyForm. Right? TThread.Synchronze pushes the procedure that is given as a

Re: [Lazarus] TThread.Synchronize

2016-10-25 Thread Michael Schnell via Lazarus
If you don't call CheckSynchronize within MyForm.MyMethod then yes. IMHO the (hardly documented) CheckSynchronize should not be called directly by an application that uses a Widget Type that features an Event Queue. Here the user should do "Application.ProcessMessages", that is decently

Re: [Lazarus] Teaching Pascal at College

2016-10-24 Thread Michael Schnell via Lazarus
On 18.10.2016 17:16, Jürgen Hestermann via Lazarus wrote: Yes, therefore start with simple procedural (console) programs that let them have immediate success with all the elementary things that a program consists of (variables/types, loops, commands, etc.). Yep. Satisfying for a Nerd, but it

Re: [Lazarus] How to use strings properly with fixes_1_6 and FPC 3.0.0?

2016-10-24 Thread Michael Schnell via Lazarus
On 23.10.2016 11:31, Jürgen Hestermann via Lazarus wrote: But Unicode should have cared. It was made for its use on computers. I don't think so. I suppose it was defined top allow for printing out digital documents in mind, but not with working with them. At least this i what the outcome

Re: [Lazarus] Teaching Pascal at College

2016-10-24 Thread Michael Schnell via Lazarus
On 21.10.2016 11:09, Jürgen Hestermann via Lazarus wrote: What is the use of a program? Entertainment? Nowadays in 90% of the usage exactly this. Maybe other usage cases are more "important", but still the money is made with Entertainment. -Michael --

Re: [Lazarus] How to use strings properly with fixes_1_6 and FPC 3.0.0?

2016-10-24 Thread Michael Schnell via Lazarus
On 24.10.2016 13:34, Mattias Gaertner via Lazarus wrote: That depends on what you mean with "identical". You are absolutely right. Very sorry for being critical while being vague myself (again typing faster than thinking) ;) . I meant to point out exactly this ambiguity: identically coded

Re: [Lazarus] How to use strings properly with fixes_1_6 and FPC 3.0.0?

2016-10-24 Thread Michael Schnell via Lazarus
On 24.10.2016 15:09, Mattias Gaertner via Lazarus wrote: These functions exist. This of course is great (while the lack of documentation supposedly makes them hard to use). In fact I am not asking, but the question is part of the OP's problem. And here I wanted to point out the ambiguity of

Re: [Lazarus] Teaching Pascal at College

2016-10-24 Thread Michael Schnell via Lazarus
On 21.10.2016 10:12, Lars via Lazarus wrote: Today's bloatware applications are so large no one can understand them IMHO, you did a good job to scare everybody away from even thinking about starting to try programming. So we should just stop "Teaching Pascal at College". -Michael --

Re: [Lazarus] Teaching Pascal at College

2016-10-24 Thread Michael Schnell via Lazarus
On 21.10.2016 09:51, Lars via Lazarus wrote: The concept of callbacks is very similar to events. The difference is that with a callback you usually know both sides and hence how exactly it is called, while with an event (especially when fired by the LCL on behalf of something that happens in

Re: [Lazarus] Teaching Pascal at College

2016-10-24 Thread Michael Schnell via Lazarus
On 21.10.2016 14:05, Martin Schreiber via Lazarus wrote: Win32 API works with message queues. Happily, the application programmer does not need to know about that, as the LCL completely hides the underlying complexity. He sees the same type of "GUI"-events, independent of running on Winx

Re: [Lazarus] How to use strings properly with fixes_1_6 and FPC 3.0.0?

2016-10-24 Thread Michael Schnell via Lazarus
On 21.10.2016 12:05, Gabor Boros via Lazarus wrote: 2016. 10. 21. 10:25 keltezéssel, Juha Manninen via Lazarus írta: * Please read the wiki page ... I read, I read but if contains buggy example... ;-) I need a quick and a rock solid solution. AFAIK, the only decent advice is never to use

Re: [Lazarus] TPageControl OnChange calling issue

2016-11-14 Thread Michael Schnell via Lazarus
On 13.11.2016 21:37, Ondrej Pokorny via Lazarus wrote: On 05.10.2016 14:07, Michael Schnell via Lazarus wrote: If not set it will be the old OnChange behavior. Or they other way round: nboOldOnChange? Or do you have any other name suggestions? I suppose it will not be a Boolean but the user

Re: [Lazarus] TPageControl OnChange calling issue

2016-11-15 Thread Michael Schnell via Lazarus
On 15.11.2016 07:41, Ondrej Pokorny via Lazarus wrote: Then there's the problem with what behavior should be default. That supposedly can easily be defined by the general "mode" setting. -Michael -- ___ Lazarus mailing list

Re: [Lazarus] TPageControl OnChange calling issue

2016-11-16 Thread Michael Schnell via Lazarus
On 16.11.2016 10:33, Ondrej Pokorny via Lazarus wrote: The mode settings have unit-scope. TPageControl/TCustomTabControl are in unit ComCtrls that is always built with objfpc mode. I see. Thanks, -Michael -- ___ Lazarus mailing list

Re: [Lazarus] TPageControl OnChange calling issue

2016-11-16 Thread Michael Schnell via Lazarus
On 15.11.2016 18:28, Bart via Lazarus wrote: Mode switches are about coding (how the compiler should behave), not about how components should behave once compiled. Of course I do know that they are used in that way. I just wanted to say that the Delphi compatibility modes *could* be used to

Re: [Lazarus] Quad precision library for Free Pascal

2016-11-21 Thread Michael Schnell via Lazarus
On 19.11.2016 00:01, Ken Kashmarek via Lazarus wrote: Does anyone know of or have implemented a quad precision (128-bit) library for Free Pascal. I see there are some available for C or GCC but not Free Pascal directly. Your feedback is appreciated I read many threads about arbitrary precision

Re: [Lazarus] Teaching Pascal at College

2016-10-13 Thread Michael Schnell via Lazarus
On 12.10.2016 20:10, Adrian De Armas via Lazarus wrote: teach how to create rich GUI Applications and to my surprise the idea was well recieved. Now I have to make suggestions about how to prepar The GUI development in Lazarus is not "modern" at all (but IMHO a *very* decent way to do a GUI).

Re: [Lazarus] In search of a component for holding a table of strings

2017-01-12 Thread Michael Schnell via Lazarus
On 11.01.2017 15:58, Mattias Gaertner via Lazarus wrote: You need to check common cases, not uncommon IMHO it's very prone to error to deliberately define something as "common". Even if you do a decent statistic of usage cases, this can vary after some time. -Michael --

Re: [Lazarus] In search of a component for holding a table of strings

2017-01-06 Thread Michael Schnell via Lazarus
On 05.01.2017 18:10, Bart via Lazarus wrote: Just implemented sorting. Nice ! (Even if I don't see a straight forward understanding of two dimensional sorting). BTW.: Looking at the code I could imagine that auto-growing when using the Cell property to write an element might be

Re: [Lazarus] In search of a component for holding a table of strings

2017-01-06 Thread Michael Schnell via Lazarus
On 06.01.2017 16:20, Bart via Lazarus wrote: That makes no sense to me, Instead of a two dimensional array of strings you could have use a single dimensional array of StringLists (a less symmetrical way, of course). -Michael -- ___ Lazarus mailing

Re: [Lazarus] In search of a component for holding a table of strings

2017-01-10 Thread Michael Schnell via Lazarus
On 09.01.2017 23:28, Werner Pamler via Lazarus wrote: I would be tempted to implement such a table in fpspreadsheet, but its problem is that it occupies memory for empty cells while the AVLTree stores only existing cells (at the expense of the cell record which contains row and column

[Lazarus] Zeos SQLite Linux

2017-03-27 Thread Michael Schnell via Lazarus
I'd like to check out working with Zeos and SQLite. I have an "SVN" installation of Lazarus on Linux. So i used same for testing. I found a demo program and when trying this I found it includes the line sLibraryLocation := sAppPath + 'sqlite3_library.dll'; So it obviously is doe for Windows

Re: [Lazarus] Quick Video: A Web Application

2017-04-20 Thread Michael Schnell via Lazarus
On 20.04.2017 11:11, Graeme Geldenhuys via Lazarus wrote: Yes, many times. There obviously are lots of alternate GUI design tools (e.g. mse, FireMonkey, WXPython (Poenix), ...) . But for Lazarus users, it of course would be beneficial to be able to use the GUI designer already perfectly

Re: [Lazarus] Quick Video: A Web Application

2017-04-20 Thread Michael Schnell via Lazarus
On 19.04.2017 17:21, Graeme Geldenhuys via Lazarus wrote: I believe that is what Michael van Canneyt is working on. It seems like, which to me is great news ! Of course we would need first a Pascal->WebAssembly compiler and then a new WidgetType in Lazarus. Same maybe could be derived from

Re: [Lazarus] Quick Video: A Web Application

2017-04-20 Thread Michael Schnell via Lazarus
On 20.04.2017 09:54, Santiago A. via Lazarus wrote: That is what RAD and GUI designers were created for ;-) Obviously it's not easy to do a (compatible) GUI designer for a Browser-(remote)-GUI. Otherwise I suppose Lazarus would have it. With WebAssembly, maybe there is a new chance...

Re: [Lazarus] Why lazarus is sorely needed: A plea for stability and backwards compatibility

2017-04-20 Thread Michael Schnell via Lazarus
+1 !!! The dream: Write and test a program using in a (partly) RAD way, of course in an Event-programming way, using the Lazarus IDE - say - in Windows. Now just by changing some settings, compile it for - Win32 - Win42 - Win 32 or 64 as a service (hence also running on WIN IOT Core) -

Re: [Lazarus] The new kid is growing up fast

2017-08-16 Thread Michael Schnell via Lazarus
On 15.08.2017 21:40, Ondrej Pokorny via Lazarus wrote: Too bad that Eugene didn't decide to improve Lazarus Cocoa bindings :) Does he use fpc as a compiler ? -Michael -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org

Re: [Lazarus] String vs WideString

2017-08-16 Thread Michael Schnell via Lazarus
On 16.08.2017 11:55, Mattias Gaertner via Lazarus wrote: 1,114,112 possible code points need at most 21 bits. Due to encoding at most 32bit. Sorry. Typo. -Michael -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org

Re: [Lazarus] String vs WideString

2017-08-16 Thread Michael Schnell via Lazarus
On 15.08.2017 21:38, Ondrej Pokorny via Lazarus wrote: Furthermore, if you use(d) strings for binary data, just replace old string for AnsiString/RawByteString (and Char for AnsiChar, PChar for PAnsiChar) and you are good to go. Annoying but no big deal. This only works if all tools that you

Re: [Lazarus] String vs WideString

2017-08-16 Thread Michael Schnell via Lazarus
On 16.08.2017 11:32, Mattias Gaertner via Lazarus wrote: Anyone who wants to discuss the grand picture of strings in FPC for the millionth time should start a new topic. Right you are. And it will be by far too late and futile, anyway, because of the reasons discussed a million times.

Re: [Lazarus] String vs WideString

2017-08-16 Thread Michael Schnell via Lazarus
On 15.08.2017 22:45, Graeme Geldenhuys via Lazarus wrote: How is that not "abuse"??? IMHO it's a major shortcoming to define "string" as "printable text". In fact the name "String" does not suggest this at all. A "string" in my understanding just is a sequence of similar "things". A

Re: [Lazarus] String vs WideString

2017-08-16 Thread Michael Schnell via Lazarus
On 16.08.2017 10:58, Mattias Gaertner via Lazarus wrote: This thread is going out of topic. Please start a new thread if you want to discuss Delphi strings. You can't discuss fpc's string problems without mentioning Delphi, as they are a direct consequence as well of Delphi-compatibility as of

Re: [Lazarus] String vs WideString

2017-08-16 Thread Michael Schnell via Lazarus
On 16.08.2017 11:08, Graeme Geldenhuys via Lazarus wrote: So it makes sense that TStrings should use UnicodeString internally to store its data. The Unicode standard is also the only standard that can support any language. But in fact "Unicode" is just a universal standard defining 64 bit

Re: [Lazarus] dynamic string proposal

2017-08-16 Thread Michael Schnell via Lazarus
On 16.08.2017 11:51, Mattias Gaertner via Lazarus wrote: Every Delphi/FPC type has a bunch of operators. Strings support :=, =, <>, >=, <= and [] for read and write. When you propose a new string type "dynamicstring" you have to define these operators. That is easily doable. The definition of

Re: [Lazarus] String vs WideString

2017-08-16 Thread Michael Schnell via Lazarus
On 15.08.2017 19:18, Graeme Geldenhuys via Lazarus wrote: Why can't that be changed to a UnicodeString or UTF8String IMHO, any implementation of TStrings that forces a conversion (just because the class uses TStrings and not due to a logical demand), is a contradiction to providing code

Re: [Lazarus] String vs WideString

2017-08-16 Thread Michael Schnell via Lazarus
On 16.08.2017 11:08, Graeme Geldenhuys via Lazarus wrote: Are you suggesting that internally TStrings should have different storage for all possible languages, Not at all. In the said paper I point out that a new fully dynamical string encoding brand would be introduced and same is used for

Re: [Lazarus] String vs WideString

2017-08-16 Thread Michael Schnell via Lazarus
On 16.08.2017 12:22, Juha Manninen via Lazarus wrote: You should stop writing in this thread now. I agree with Mattias. I perfectly agree with you. But you can't blame me for answering when asked. -Michael -- ___ Lazarus mailing list

Re: [Lazarus] dynamic string proposal

2017-08-16 Thread Michael Schnell via Lazarus
On 16.08.2017 14:30, Martin Frb via Lazarus wrote: And that would still not be "char", but "codepoint" A char can be composed of several combining code points (each of them afaik, in the 32 bit range). So a char can have 96 or more bits. (And not all of them have a combined form).

Re: [Lazarus] dynamic string proposal

2017-08-16 Thread Michael Schnell via Lazarus
On 16.08.2017 14:22, Alexey via Lazarus wrote: BTW, it will be good to have "Cstring" (or another name, not "dynamicstring") : ... You are missing the point the paper is supposed to be about: enhancing the versatility of the library functions such as those using TStrings. Not just creating

Re: [Lazarus] dynamic string proposal

2017-08-16 Thread Michael Schnell via Lazarus
On 16.08.2017 13:17, Mattias Gaertner via Lazarus wrote: You are confusing people if you name your encodings like this. There also is no "official" Code pages named "Default" or "None", the naming "CP_DEFAULT" and "CP_NONE" has just been invented by Emparcadero. So I did the same and just

Re: [Lazarus] String vs WideString

2017-08-15 Thread Michael Schnell via Lazarus
On 15.08.2017 14:53, Mattias Gaertner via Lazarus wrote: Do you mean a 'char' is a string in your proposal? Nope. In my proposal there would be Chars for any statically encoded String Type, hence 1, 2, 4, and 8 byte wide. (As regarding statically encoded string (and char) brands, it's just an

Re: [Lazarus] dynamic string proposal

2017-08-16 Thread Michael Schnell via Lazarus
On 16.08.2017 14:43, Mattias Gaertner via Lazarus wrote: For some unknown reason you want to store different encodings in a TStrings and fear the "time-consuming" and loss-prone auto conversions. It's obvious that a user using a different encoding brand in a string var than that suggested by

Re: [Lazarus] dynamic string proposal

2017-08-16 Thread Michael Schnell via Lazarus
On 16.08.2017 14:43, Mattias Gaertner via Lazarus wrote: Not if complicated things get more complicated. Please leave out the additional encoding brands suggested just as an afterthought in the paper. These are not the purpose at all but ()if the other stuff would be in place) just com as a

Re: [Lazarus] dynamic string proposal

2017-08-16 Thread Michael Schnell via Lazarus
On 16.08.2017 15:33, Juha Manninen via Lazarus wrote: Why don't you implement such a system. This is all FOSS, free and open source. I would never dare to try to edit the compiler :-[ You are writing about encodings etc. which are part of codepoints, but you call them "characters". Why?

Re: [Lazarus] dynamic string proposal

2017-08-16 Thread Michael Schnell via Lazarus
On 16.08.2017 17:20, Juha Manninen via Lazarus wrote: Unicode is the standard now. We cannot ignore it, and we don't want to ignore it because it solves so many problems of the earlier solutions. If you create a new string type, you certainly must take Unicode into account. It is not "ignored",

Re: [Lazarus] dynamic string proposal

2017-08-16 Thread Michael Schnell via Lazarus
On 16.08.2017 17:55, Juha Manninen via Lazarus wrote: although Pos(), Copy() and Length() deal with CodeUnit resolution. I wonder how the new fancy string types would handle it without a performance penalty. This again is not in the scope of the paper, and supposed to stay as it is. S[x],

Re: [Lazarus] String vs WideString

2017-08-15 Thread Michael Schnell via Lazarus
On 14.08.2017 18:47, Sven Barth via Lazarus wrote: The main problem of such a dynamic type would be the inability to do fast indexing as the compiler would need to insert runtime checks for the size of a character. What "indexing" do you think of ? Could you give an example where such a

Re: [Lazarus] String vs WideString

2017-08-15 Thread Michael Schnell via Lazarus
On 15.08.2017 11:25, Michael Van Canneyt via Lazarus wrote: WideString/UnicodeString for those that want 2-byte characters. A codepage-aware single-byte string for those that want 1-byte characters. The shortstring is even still available. IM (often stated) O, this does not help as long as

Re: [Lazarus] String vs WideString

2017-08-15 Thread Michael Schnell via Lazarus
On 15.08.2017 11:15, Tony Whyman via Lazarus wrote: In this case, I would argue that both are true. And the culprit obviously is Embarcadeo and not the fpc or the Lazarus team, who did their best to try to do a compatible and implementation that is really workable on the multiple supported

Re: [Lazarus] String vs WideString

2017-08-15 Thread Michael Schnell via Lazarus
On 14.08.2017 18:49, Sven Barth via Lazarus wrote: Because the crowd demanding Delphi compatibility is larger than the crowd demanding exact terminology. ... or even a revised concept avoiding the junk presented by Embarcadero :( But obviously the fpc team has no choice. -Michael --

Re: [Lazarus] String vs WideString

2017-08-15 Thread Michael Schnell via Lazarus
On 15.08.2017 11:52, Michael Van Canneyt via Lazarus wrote: This cannot be solved properly except by duplicating the classes unit. Sorry to disagree, but IMHO this can only be solved properly by defining an additional fully dynamically encoded string type and use same for TStrings (see ->

Re: [Lazarus] String vs WideString

2017-08-15 Thread Michael Schnell via Lazarus
On 15.08.2017 12:15, Michael Van Canneyt via Lazarus wrote: What does S[2] mean in your proposal ? Is it 1, 2, 4 or even 8 bytes ? Regarding the users' appreciation, the S[x] notation is decently incompatible between the different string types and compiler versions. There were hundreds of

Re: [Lazarus] The new kid is growing up fast

2017-08-15 Thread Michael Schnell via Lazarus
On 15.08.2017 13:19, Graeme Geldenhuys via Lazarus wrote: Just wanted to show you guys something. Great. CrossVCL seems to allow to easily port Delphi VCL applications to Mac and Linux. How to compare it against Lazarus ? -Michael -- ___ Lazarus

Re: [Lazarus] String vs WideString

2017-08-15 Thread Michael Schnell via Lazarus
On 15.08.2017 11:15, Tony Whyman via Lazarus wrote: 3. The problem with string handling today is that it is not based on a consistent approach to the character type. If you clean up character handling then the model for string handling should become obvious. A string is after all no

Re: [Lazarus] String vs WideString

2017-08-15 Thread Michael Schnell via Lazarus
On 15.08.2017 12:11, Mattias Gaertner via Lazarus wrote: It does not explain what the characters of DynamicString are, does it? I don't understand what you are asking. The element size and encoding of a Dynamic String ("CP_ANY" in the document) are not predefined, but depend on the content:

Re: [Lazarus] String vs WideString

2017-08-15 Thread Michael Schnell via Lazarus
On 15.08.2017 11:15, Tony Whyman via Lazarus wrote: Why shouldn't there be a single char type that intuitively represents a single character regardless of how many bytes are used to represent it. I suppose by "char" you mean "single printable thingy" with Unicode it's rather debatable what

Re: [Lazarus] String vs WideString

2017-08-14 Thread Michael Schnell via Lazarus
On 13.08.2017 22:41, Juha Manninen via Lazarus wrote: You have misused "String" or "AnsiString" from the beginning for binary data. There have always been warnings against it. While this might be true, it's decently silly, IMHO. The name "String" can easily be interpreted as "String of things"

Re: [Lazarus] String vs WideString

2017-08-14 Thread Michael Schnell via Lazarus
On 14.08.2017 14:50, Marcos Douglas B. Santos via Lazarus wrote: "The right solution is to use Unicode everywhere." Embarcadero though that this would not b the "right" solution. Otherwise they would not have invented the encoding aware strings. IMHO that was a good idea. They only

Re: [Lazarus] String vs WideString

2017-08-17 Thread Michael Schnell via Lazarus
On 16.08.2017 20:26, Luca Olivetti via Lazarus wrote: Call me lazy but I don't want to reinvent the wheel and re-implement from scratch the functionality that a plain ansistring provides and TBytes to this day doesn't. So please continue in the thread "dynamic string proposal". Exactly this

Re: [Lazarus] dynamic string proposal

2017-08-17 Thread Michael Schnell via Lazarus
Maybe, Sven could answer to this mail in the other thread... On 14.08.2017 18:47, Sven Barth via Lazarus wrote: The main problem of such a dynamic type would be the inability to do fast indexing as the compiler would need to insert runtime checks for the size of a character. What

Re: [Lazarus] String vs WideString

2017-08-17 Thread Michael Schnell via Lazarus
On 16.08.2017 22:40, Sven Barth via Lazarus wrote: Trunk supports Insert() and Delete() on dynamic arrays, Concat() and + are on the near term ToDo list. Supposedly "pos", as well. But that does not really help if we don't have a TStringList workalike, and supposedly several more library

Re: [Lazarus] String vs WideString

2017-08-17 Thread Michael Schnell via Lazarus
On 17.08.2017 12:09, Bart via Lazarus wrote: Variables of the ordinal type Char are used to store ASCII characters." According to this wording, using Windows with ANSI character set would be a no-go. -Michael -- ___ Lazarus mailing list

Re: [Lazarus] String vs WideString

2017-08-17 Thread Michael Schnell via Lazarus
On 17.08.2017 12:41, Tony Whyman via Lazarus wrote: UCS-2 differs from UTF-16 by being a constant length encoding and only capable of encoding characters of BMP, it is supported by many programs." Rather obviously Embarcadero primarily had UCS-2 in mind as they created the "Unicode aware"

Re: [Lazarus] String vs WideString

2017-08-17 Thread Michael Schnell via Lazarus
On 17.08.2017 12:41, Tony Whyman via Lazarus wrote: Finally: "In UTF-16, code points greater or equal to 2^16 are encoded using /two/ 16-bit code units. 2¹⁵ ??? -Michael-- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org

Re: [Lazarus] Android & iOS

2017-07-05 Thread Michael Schnell via Lazarus
They claim Delphi VCL compatibility and hence it should be compatible to LCL, as well. -> http://www.elementscompiler.com/elements/whatsnew.aspx (I did not test any of their products.) -Michael -- ___ Lazarus mailing list

Re: [Lazarus] String vs WideString

2017-08-18 Thread Michael Schnell via Lazarus
On 17.08.2017 11:27, Sven Barth via Lazarus wrote: Why do you want to stuff everything and the kitchen sink into TStrings? To make use of the benefits the string type offers such as reference counting and lazy copy. -Michael -- ___ Lazarus

Re: [Lazarus] German lazarus forum down

2017-05-16 Thread Michael Schnell via Lazarus
Vielen Dank für den Hinweis ! -Michael -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus

Re: [Lazarus] Enqueuing a callback from a thread via other class - or am I overcomplicating this ?

2017-06-19 Thread Michael Schnell via Lazarus
On 17.06.2017 22:25, el es via Lazarus wrote: Where does the call queued from a thread, return to ? From the POV of the application programmer: "nowhere". it's just another (main-Thread-) "Event" that (like "OnClick") gets "fired" by the Lazarus/fpc infrastructure and is done. The object's

Re: [Lazarus] Making sources compatible with Delphi (but Lazarus is priority)

2017-05-05 Thread Michael Schnell via Lazarus
On 05.05.2017 12:16, Graeme Geldenhuys via Lazarus wrote: In the end it’s about supporting Unicode. Does it really matter what internal encoding it is to achieve the “Unicode support” goal? Yep it does. There are ways around that issue (i.e. code aware strings) but in fact these trigger a

Re: [Lazarus] Making sources compatible with Delphi (but Lazarus is priority)

2017-05-05 Thread Michael Schnell via Lazarus
On 04.05.2017 16:56, Juha Manninen via Lazarus wrote: I believe everybody is happy to get rid of the horrendous Windows If if this is true, there is a decent need for backwards compatibility. That is why, theoretically, code aware strings is a good idea. Unfortunately the implementation of

[Lazarus] FPVectorial

2017-10-16 Thread Michael Schnell via Lazarus
I rather unsuccessfully tried to use the pdf decoder example provided here  -> http://wiki.lazarus.freepascal.org/fpvectorial . I needed to add the package fpvectorial to my project. Now I can do "use fpvectorial". The project needs "use pdfvectorialreader". To allow for this I needed to

Re: [Lazarus] Weird object variables access - fpc issue?

2017-10-24 Thread Michael Schnell via Lazarus
On 24.10.2017 11:29, Mattias Gaertner via Lazarus wrote: Are you kidding? If this is not appropriate, I suppose the general design of that functionality should be reconsidered, doing anything that needs a fast reaction in the worker thread. -Michael --

Re: [Lazarus] Weird object variables access - fpc issue?

2017-10-24 Thread Michael Schnell via Lazarus
On 24.10.2017 10:48, el es via Lazarus wrote: [...] begin repeat until not ThreadNowInUse; // try ThreadNowInUse :=true; Busy wait actions are usually a very bad idea Better use a TTimer for such. -Michael -- ___ Lazarus

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

2017-11-27 Thread Michael Schnell via Lazarus
On 26.11.2017 17:13, Sven Barth via Lazarus wrote: Lazarus already contains a custom drawn widgetset that supports X11. I don't know its current state, but maybe it would be best to bring that up to speed and form instead of starting a new one. Some time ago I did play with the custom drawn

  1   2   >