Re: [Lazarus] How TDBGrid works
On Sunday 08 May 2016 08:44:37 Aradeonas wrote: > A simple way is to make BufferCount=RecordCount so all record will be in > buffer, it will be fast and easy to use and good for even couple of > thousands records but not a real solution. > The data will be dupplicated. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How TDBGrid works
On Sunday 08 May 2016 04:31:29 Jesus Reyes A. wrote: > En Sat, 07 May 2016 01:26:38 -0500, Martin Schreiber <mse00...@gmail.com> > > escribió: > > On Friday 06 May 2016 23:20:41 Aradeonas wrote: > >> Thanks. > >> > >> So what is the best way to provide those 100 to 1100 record at least > >> without Dataset calling AfterScroll event? > >> I want to not make any event while scrolling my custom Grid so other > >> connected DB controls change their values otherwise while Im scrolling > >> my custom grid it will cause calling all connected DB controls to update > >> their values. > >> I hope it is more clear now. > > > > If the wanted record is in window of TDataLink.FirstRecord..FirstRecord + > > BufferCount - 1 you can temporarily switch the record which supplies the > > field data by setting TDatalink.ActiveRecord which doesn't fire any > > events. I > > assume you know that. ;-) > > See for example the MSEgui functions TGridDatalink.GetDisplay*Buffer(), > > BeginGridRow() and EndGridRow(). > > https://gitlab.com/mseide-msegui/mseide-msegui/raw/master/lib/common/db/m > >sedbedit.pas > > Good luck by trying that while FirstRecord is "pointing" to record 1000 > AND keeping RecNo at 1, maybe I misunderstood something. > Then the "wanted record" is *not* in in window of TDataLink.FirstRecord..FirstRecord + BufferCount - 1 a dataset with direct data access like TMSEBufDataset or the problematic DisableControls()/EnableControls() trick is necessary. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How TDBGrid works
On Saturday 07 May 2016 11:03:28 Aradeonas wrote: > > > A possible workaround could be to call TDataset.DisableControls(), to > > fetch the needed records and to restore the DB cursor position before > > calling EnableControls(). I fear it is not efficient and has > > sideeffects. > > What side effects do you think about? > Maybe changed record buffer window which could trigger recentering of grids. You must try it, the buffer and scrolling system is complicated... Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How TDBGrid works
On Friday 06 May 2016 23:20:41 Aradeonas wrote: > Thanks. > > So what is the best way to provide those 100 to 1100 record at least > without Dataset calling AfterScroll event? > I want to not make any event while scrolling my custom Grid so other > connected DB controls change their values otherwise while Im scrolling > my custom grid it will cause calling all connected DB controls to update > their values. > I hope it is more clear now. > If the wanted record is in window of TDataLink.FirstRecord..FirstRecord + BufferCount - 1 you can temporarily switch the record which supplies the field data by setting TDatalink.ActiveRecord which doesn't fire any events. I assume you know that. ;-) See for example the MSEgui functions TGridDatalink.GetDisplay*Buffer(), BeginGridRow() and EndGridRow(). https://gitlab.com/mseide-msegui/mseide-msegui/raw/master/lib/common/db/msedbedit.pas If the wanted records are anywhere in the dataset you need a dataset with random row data access. TMSEBufDataset supports it, please see the TMSEBufDataset.Current* properties. https://gitlab.com/mseide-msegui/mseide-msegui/raw/master/lib/common/db/msebufdataset.pas The MSEgui dropdownlist DB-edits use this approach for lookups if Dropdown.OptionsDB odb_directdata is set. A possible workaround could be to call TDataset.DisableControls(), to fetch the needed records and to restore the DB cursor position before calling EnableControls(). I fear it is not efficient and has sideeffects. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] PDF generator, try 2
On Thursday 07 April 2016 13:49:06 Graeme Geldenhuys wrote: > I was about to mention that. This was discussed before, and there was a > reason (which eludes me now) why FillChar() will not be changed. Because out parameters are finalised on caller side: " Procedure FillChar1(out x;count:SizeInt;Value:Byte); begin fillchar(x,count,value); end; procedure tmainfo.exe(const sender: TObject); type testty = record a: int32; b: string; end; ptestty = ^testty; var po1: ptestty; begin getmem(po1,sizeof(testty)); pointer(po1^.b):= pointer(123467); //random value // fillchar(po1^,sizeof(testty),0); //OK fillchar1(po1^,sizeof(testty),0); //crash because out paramters are //finalized on caller side po1^.b:= 'abc'; finalize(po1^); freemem(po1); end; " Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] German umlauts in component names
On Saturday 02 April 2016 10:30:51 Mattias Gaertner wrote: > > We have many Delphi Programs with German Umlauts in component names and > > would like to go to Lazarus with them. > > Any hints? > > This is not supported by FPC yet. Not supported *yet*? Shudder. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Xamarin becomes free and open-source
On Thursday 31 March 2016 20:30:59 Anthony Walter wrote: > I thought this was newsworthy and of interest to us: > > https://blog.xamarin.com/xamarin-for-all/ A date effect maybe? ;-) Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Feature Request: Insert {codepage UTF8} per default
On Wednesday 30 March 2016 11:23:49 Juha Manninen wrote: > > If one wants to handle BMP-chars comfortably and with good performance > > one has to convert from utf-8 in AnsiString to UnicodeString first. > > Maybe, but BMP-chars are not enough for a proper Unicode support. But they are enough to be used in Russian and German pupils homework, utf-8 code units are not enough, please read lazarusformum.de. ;-) Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Feature Request: Insert {codepage UTF8} per default
On Wednesday 30 March 2016 10:13:36 Juha Manninen wrote: > With Unicodestring we don't need to care about backwards compatibility > really because it is so new type. Ouch! WideString has been introduced in Delphi 4 IIRC, FPC had an on all platforms reference counted 16-bit string which worked like current UnicodeString. IIRC it was about version 1.8 when FPC introduced this string type. Kylix WideString (Linux) also was reference counted. Later FPC changed WideString on Windows ( against my strong opposition, well-understood ;-) ) to the not reference counted OLE-string. A little bit later FPC added the on all platforms reference counted UnicodeString again. So one can say that at the moment when Lazarus became Unicode capable there was a UnicodeString-like stringtype available in FPC. It was very buggy, so probably this was one of the reasons that Lazarus used utf-8 in AnsiString instead. For MSEgui on the other hand I used WideString/UnicodeString from beginning and wrote FPC bug-reports until FPC WideString became production ready. > What more, Unicodestring is not needed often when using our new Unicode > system. > If one wants to handle BMP-chars comfortably and with good performance one has to convert from utf-8 in AnsiString to UnicodeString first. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Panel Top Negative Limitation
On Thursday 04 February 2016 23:09:39 Graeme Geldenhuys wrote: > On 2016-02-04 17:51, i...@voiceliveeditor.com wrote: > > How can this be corrected; or is there a workaround? > > I'm not 100% sure, but I believe some windowing environments have a > 65535px (or around that) upper limit. It might be that you are hitting > that boundary. > X11 has a range of -32768..32767. Although the OP is on Windows AFAIK. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Tool to convert a multiline text to a pascal string constant
On Tuesday 02 February 2016 22:33:56 Luiz Americo Pereira Camara wrote: > Hi is there any tool for Lazarus to convert a multi line text (xml snipet, > SQL) to a string constant? > In MSEide select the text in source editor, RightClick-'Convert to Pascal string'. Code is here: https://gitlab.com/mseide-msegui/mseide-msegui/raw/master/lib/common/kernel/mseformatstr.pas Function "stringtopascalstring()". Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus compile project via ssh?
On Sunday 20 December 2015 10:34:33 Mark Morgan Lloyd wrote: > Martin Schreiber wrote: > > On Sunday 20 December 2015 08:59:35 Anthony Walter wrote: > >> I am wondering, is it possible to configure Lazarus to compile a project > >> on a remote computer running a different platform/architecture through > >> ssh? > >> > >> I've been doing Lazarus development on Linux on a quad core amd64 > >> desktop PC for a while now and it feels comfortable. But I do have a few > >> arm6/7 Raspberry Pi computers with FPC/Lazarus as well. > > > > I successfully use cross-compiling and remote debugging from x86 Linux to > > Raspberry Pi. MSEide has project templates for that purpose in > > apps/ide/templates/crossarm*.prj, please see README.TXT. > > http://mseide-msegui.sourceforge.net/pics/crossarm.png > > > > It is probably possible to setup Lazarus to to the same. > > Generally works well, provided that the desktop machine's X11 server > fully supports the primitives expected by the target machine's widget set. > I use remote debugging by gdbserver running on Raspberry Pi. The target uses the Rpi X11 server, so one needs to see the Rpi screen and reach the target keyboard and mouse in order to debug a graphical application with this setup. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus compile project via ssh?
On Sunday 20 December 2015 08:59:35 Anthony Walter wrote: > I am wondering, is it possible to configure Lazarus to compile a project on > a remote computer running a different platform/architecture through ssh? > > I've been doing Lazarus development on Linux on a quad core amd64 desktop > PC for a while now and it feels comfortable. But I do have a few arm6/7 > Raspberry Pi computers with FPC/Lazarus as well. > I successfully use cross-compiling and remote debugging from x86 Linux to Raspberry Pi. MSEide has project templates for that purpose in apps/ide/templates/crossarm*.prj, please see README.TXT. http://mseide-msegui.sourceforge.net/pics/crossarm.png It is probably possible to setup Lazarus to to the same. The cross-compiling environment is here: http://sourceforge.net/projects/mseide-msegui/files/fpcrossarm/ Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] UTF8String and UTF8Delete
On Friday 11 December 2015 08:05:12 Sven Barth wrote: > Am 10.12.2015 23:04 schrieb "Mattias Gaertner": > > > > What about: > > > > UTF8Delete(AnsiString(Pointer(s)),1,1); > > While the typecast itself would probably work I strongly advice against it > since you're relying on implementation details. Also I doubt that you can > do this for var parameters... > It is difficult to make efficient Free Pascal applications without such "tricks". ;-) Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Fast GUI
On Monday 30 November 2015 13:51:38 Aradeonas wrote: > Martin is mse support transparent text box or these > component with OpenGL? In the experimental MSEgui OpenGL backend? Yes, transparent text is supported. But it is experimental and the performance is not very good. > As I remember you said that mse use no handle per > control so what mse do for text component or lists? > MSEgui sends graphics primitives to xlib or xrender on Linux and FreeBSD or to gdi32 or gdi+ on Windows. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Fast GUI
On Monday 30 November 2015 11:35:08 Aradeonas wrote: > Hi, > > I am working on a specefic GUI that need to be too fast and for this I > have fpGUI or mse but in this project I need fast image and resizing and > as I tested the fastest way for this kind of jobs OpenGL is the best so > I made a project on it and everything is great and much much fast! So I > want to ask is there any works on creating GUI with OpenGl that not be > only for games or be for games but useful for specific applications and > maybe using OS theme. MSEgui has an experimental OpenGL backend. OpenGL is not well-suited to support 2D GUIs IMO. Because of the many different versions and implementations, all with different extensions, limitations and bugs, working with OpenGL is a difficult task. MSEgui uses hardware acceleration if available. A framework for animations with a central frame tick and the like is planned, although performance of simple hardware accelerated canvas drawing is not bad, see for example: http://mseide-msegui.sourceforge.net/pics/blend.mpeg http://mseide-msegui.sourceforge.net/pics/blend1.png http://mseide-msegui.sourceforge.net/pics/blend2.png http://mseide-msegui.sourceforge.net/pics/blend3.png The project is here: https://gitlab.com/mseuniverse/mseuniverse/tree/master/samples/widgets/blendpos (needs MSEide+MSEgui git master version). The code: " procedure tmainfo.childmouseeventexe(const sender: twidget; var ainfo: mouseeventinfoty); begin image.face.image.center:= TranslateWidgetToPaintPoint(ainfo.pos,sender,image); end; " The whole rest are design time property settings only. > I remember FireMonkey but in what we have Lazarus? AFAIK FireMonkey has no good performance. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Failed to build lazarus release 1.4.4 from svn
On Sunday 08 November 2015 21:59:28 Bo Berglund wrote: > On Sun, 08 Nov 2015 16:15:59 +0100, Bo Berglund > Is seed fpc 2.6.4 not enough to compile lazarus 1.4.x release? > For RaspberryPi you need the EABIHF version of the FPC-ARM compiler. For example 3.0.1 from here: http://sourceforge.net/projects/mseide-msegui/files/fpcarm/ > I want to get the release versions working since I had problems with > the trunk versions > > Please HELP! I have spent probably 10 hours today on this with > multiple downloads, builds and apt-get updates all in vain. :( Please remember: http://www.mail-archive.com/lazarus%40lists.lazarus.freepascal.org/msg50406.html ;-) Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Extending TRect breaks Lazarus
On Friday 06 November 2015 18:19:14 Michael Van Canneyt wrote: > > But presumably you mean some construct as > > With QMyVeryLongQueyObjectName as Q do >try > // Do things with Q >finally > Q.Close; >end; > > ? > Correct. There have been some more notations suggested. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Extending TRect breaks Lazarus
On Friday 06 November 2015 18:33:54 Graeme Geldenhuys wrote: > On 2015-11-06 17:19, Michael Van Canneyt wrote: > > With QMyVeryLongQueyObjectName as Q do > >try > > // Do things with Q > >finally > > Q.Close; > >end; > > var > Q: TQuery absolute QMyVeryLongQueyObjectName; > begin > with Q do > try > // Do things with Q > finally > Q.Close; > end; > > > problem solved! ;-) > Not a good idea IMHO, that hinders readability because one doesn't see the real container at the "with" block start. Another important use of "with" is to make complex address calculations only once at the "with" block start without the need to define a pointer variable in "var" and to dereference in every statement. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Extending TRect breaks Lazarus
On Friday 06 November 2015 17:20:24 Ondrej Pokorny wrote: > > Nevertheless I am of the opinion that WITH is evil and should be removed > from the IDE/LCL code (unless only identifiers from within the with > scope are used; but even then they could be removed...). Or implement a safe "with" in Free Pascal without waiting until it is enforced by Delphi compatibility... Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Extending TRect breaks Lazarus
On Friday 06 November 2015 17:42:39 Michael Van Canneyt wrote: > On Fri, 6 Nov 2015, Martin Schreiber wrote: > > On Friday 06 November 2015 17:20:24 Ondrej Pokorny wrote: > >> Nevertheless I am of the opinion that WITH is evil and should be removed > >> from the IDE/LCL code (unless only identifiers from within the with > >> scope are used; but even then they could be removed...). > > > > Or implement a safe "with" in Free Pascal without waiting until it is > > enforced by Delphi compatibility... > > Ehm. How can "with" ever be safe ? > You are joking, no? It has been discussed on fpc-pascal/fpc-devel several times. An IIRC Italian community member then usually shows a syntax description of a safe "with" statement from a maybe more than 20 year old pascal dialect. But probably such language additions are not sexy enough. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Using event driven components in console application
On Wednesday 04 November 2015 14:31:34 JuuS wrote: > > But this is what, ultimately, fpGUI will address I believe? Wiki page > says it is still alpha but I anxiously await the opportunity to use it > natively (I work in 1.4.4, I SVN only occasionally in special > circumstances) > It is also possible to use fpGUI directly without LCL layer. Same applies to MSEgui if identical look and feel on all supported platforms is important. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus implementation of TListView etc?
On Friday 23 October 2015 09:44:58 Michael Schnell wrote: > On 10/22/2015 11:13 PM, Bo Berglund wrote: > > So it had helpers to show the recorded data in listviews and other > > such GUI related stuff > > This is called "RAD" ("Rapid Application Development") and a big > marketing argument of all companies who sold Delphi. > > But it is very bad for portability. Investing some effort, it can be > overcome, though (see my message to Graeme.) > In my understanding "RAD" is visually placing components in forms and datamodules, to set component properties in objectinspector and to use event properties in order to react on events. Separating GUI and business logic is perfectly possible with RAD. Implement the business logic by components, properties and code in datamodules and additional units, for the GUI use forms witout or only GUI specific code. And before Graeme shows his image with the thousand components in a single datamodule here how it could look: http://mseide-msegui.sourceforge.net/pics/mseguirad.png ;-) In order to connect the GUI with the business model use TDatasource and TAction for example or use glue code. MSEgui additionally has the MSEifi components from component palette tab "ifi". Applications without GUI use tnoguiapplication instead of tguiapplication as application instance for the main-eventqueue. tnoguiapplication has no dependency on GUI-libraries and GUI-services and provides a platform independent API. I assume Lazarus has a similar approach. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus implementation of TListView etc?
On Friday 23 October 2015 15:49:25 Graeme Geldenhuys wrote: > On 2015-10-23 13:07, Marcos Douglas wrote: > > LOL! > > One or two times on year I see this image do you talked hehehe > > > :-) > > Two additional points: > - Martin's example is not nearly as big or complex as the example I >showed in the past. You don't know what is in the other datamodules. ;-) Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] *SPAM* Re: Win 10 IOT Core
On Tuesday 20 October 2015 11:26:25 Michael Van Canneyt wrote: > On Tue, 20 Oct 2015, Michael Schnell wrote: > > On 10/20/2015 11:05 AM, Michael Van Canneyt wrote: > >> Except that it is not remote. > > > > > > > > With the QNAP it is remote. Or am I hit by a misconception of that > > wording ? > > I understand it as follows: > > A browser application (any RIA) such as used in QNA is in fact a > client/server application. The client just happens to be a browser. > > ExtJS is meant to run in the browser. The gui is built from A to Z in the > browser. It is there for a 'local' GUI from the point of view of a > developer or end user. > That is exactly the working principle of MSEifi. The difference is that MSEifi is not implemented by a Javascript environment but by MSEgui components and widgets written in Free Pascal. On client side a MSEifi runtime which could be implemented as browser plug-in fetches the *.mfm form data (the MSEgui equivalent of Lazarus *.lfm files) and PascalScript snippets and instantiates the forms and datamodules. If wanted there are ifi components available in order to connect data points and events between server and client by a TCP/IP or other serial connection but that is no requirement. The same connection components can be used for separation of GUI and business logic in a standalone desktop application so it is possible to use the same GUI definition in both. At least in theory. ;-) Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] *SPAM* Re: Win 10 IOT Core
On Tuesday 20 October 2015 14:11:09 Michael Schnell wrote: > On 10/20/2015 02:00 PM, Martin Schreiber wrote: > > At least in theory. ;-) > > What is the state of the "ifi" project right now ? (AFAIK, you did not > publish it for others to use yet.) In process MSEifi is used in production and standard in MSEide since years, the experimental MSEifi-remote components can be integrated by compiling MSEide with -dmse_with_ifirem. MSEide git master version has them integrated by default. https://gitlab.com/mseide-msegui/mseide-msegui > > Are there any example that could demonstrate that it's not pure theory :-) > There is still the pipe demo I made for you, feel free to build some more. :-) Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] *SPAM* Re: Win 10 IOT Core
On Tuesday 20 October 2015 14:20:42 Michael Van Canneyt wrote: > > > > That is exactly the working principle of MSEifi. The difference is that > > MSEifi is not implemented by a Javascript environment but by MSEgui > > components and widgets written in Free Pascal. On client side a MSEifi > > runtime which could be implemented as browser plug-in > > And that's where the ship sinks for me... > Browser plugins are not acceptable as a viable solution. > Certainly not for universal internet use. In an industrial environment the requirements are different. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] *SPAM* Re: Win 10 IOT Core
On Tuesday 20 October 2015 14:49:28 Michael Schnell wrote: > On 10/20/2015 02:29 PM, Martin Schreiber wrote: > > There is still the pipe demo I made for you, feel free to build some > > more. :-) > > Maybe you could provide a compiled version (simply two applications) so > that the others can see what is possible with that paradigm. > There *are* compiled versions I made especially for you and which blow up the repository now. ;-) https://gitlab.com/mseuniverse/mseuniverse/tree/master/attic/msedocumenting/mse/trunk/help/tutorials/mseifi/ifipipedemo/bin Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Win 10 IOT Core
On Monday 19 October 2015 10:00:33 Michael Van Canneyt wrote: > On Mon, 19 Oct 2015, Michael Schnell wrote: > > On 10/16/2015 03:00 PM, Michael Van Canneyt wrote: > >> So, that is not the GDI winapi... > > > > Obviously.So a Delphi program never will show a a Form. > > > > But with Lazarus, the "fpGUI" and "Custom Drawn" widget sets should work, > > as - AFAIK - they can be configured to use DirectX. > > > > -> Graeme can you comment on this ? > > As far as I know, fpGUI works on GDI. > And AggPas. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiling lazarus on arm-linux
On Wednesday 30 September 2015 14:56:54 Koenraad Lelong wrote: > Hi, > > I'm trying to compile lazarus on an arm-linux system (odroid C1, but > also on RPi model 2). It works until this : > > ... > make --assume-new=svn2revisioninc.pas svn2revisioninc > make[2]: Entering directory `/home/odroid/Downloads/source/tools' > Makefile:2332: warning: overriding commands for target `.' > Makefile:2330: warning: ignoring old commands for target `.' > /home/odroid/fpc-2.6.4/bin/ppcarm -gl -Fu. > -Fu../components/lazutils/lib/arm-linux -Fu../lcl/units/arm-linux > -Fu../lcl/units/arm-linux/nogui -FE. -FU. > -Fl/usr/lib/gcc/arm-linux-gnueabihf/4.9 -Flinclude > -Fl/etc/ld.so.conf.d/*.conf -dFPC_ARMHF -darm svn2revisioninc.pas > Free Pascal Compiler version 2.6.4 [2014/03/21] for arm > Copyright (c) 1993-2014 by Florian Klaempfl and others > Target OS: Linux for ARMEL -- This is wrong, you need a eabihf compiler, either a patched FPC 2.6.4 or better FPC 3.0.1 from here: http://sourceforge.net/projects/mseide-msegui/files/fpcrossarm/ Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiling lazarus on arm-linux
On Wednesday 30 September 2015 18:46:11 Koenraad Lelong wrote: > Op 30-09-15 om 15:43 schreef Martin Schreiber: > > This is wrong, you need a eabihf compiler, either a patched FPC 2.6.4 or > > better FPC 3.0.1 from here: > > http://sourceforge.net/projects/mseide-msegui/files/fpcrossarm/ > > > > Martin > > Thanks, > > Although the link points to a crosscompiler, I managed to compile > lazarus on the odroid with binaries from your repo. Ah, sorry, wrong link, please use http://sourceforge.net/projects/mseide-msegui/files/fpcarm/ > I had to configure > the device to run without GUI because of lack of memory. > Unfortunately, when I start lazarus, it complains it can't find the > fpc-sources, which is true, because I only have a number of binaries. > Can I just get the svn-sources and use these ? > > And when I try to add packages in lazarus, I can't because of lack of > memory. So how can I add packages from the command-line ? > I normally use cross compiling and remote debugging with MSEide: http://mseide-msegui.sourceforge.net/pics/crossarm.png It needs current MSEide+MSEgui from git master: https://gitlab.com/mseide-msegui/mseide-msegui and the FPC cross environment from: http://sourceforge.net/projects/mseide-msegui/files/fpcrossarm/ There soon will be a MSEide+MSEgui 4.0beta1 release. You probably can can configure Lazarus for cross development too. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Cross-compiling for Raspberry Pi2
On Wednesday 23 September 2015 06:33:02 Bo Berglund wrote: > On Tue, 22 Sep 2015 10:00:12 +0200, Michael Schnell > >wrote: > >On 09/21/2015 04:42 PM, Bo Berglund wrote: > >> Unfortunately since the existing code is built on non-blocking serial > >> communications and events to handle the data reception ... > > > >You can convert a blocking socket (or serial port receive) to be a > >non-blocking Event-triggering (i.e. Delphi-Paradigm based) code by > >encapsulating the blocking API in a thread and fire an event to the main > >threads by TThread.Synchronize, TThread.Queue or > >Application.QueueAsyncCall. Now you can do the complex work in the main > >Thread event. > > That is what I figured I could do with the TInetSocket I found in some > response here. I have verified it ships with FPC so I don't have to do > any install or such to get it too. > > But since I did not find any documentation "for Dummies" on > TInetSocket I am not at all sure what I should do to add a therad to > manage it via an event handler. The MSEgui socket components (and the pipe reader and RS232 components too BTW) implement the model Michael describes. They have the event properties "oninputavailable" and "onsocketbroken". If you like to build something like this yourself based on "TInetSocket" the code is here: https://gitlab.com/mseide-msegui/mseide-msegui/tree/master/lib/common/ifi (msesockets.pas) https://gitlab.com/mseide-msegui/mseide-msegui/tree/master/lib/common/serialcomm (msesercomm.pas) https://gitlab.com/mseide-msegui/mseide-msegui/tree/master/lib/common/kernel (msepipestream.pas). Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Cross-compiling for Raspberry Pi2
On Monday 21 September 2015 16:42:15 Bo Berglund wrote: > That is where I > have to tie in the conditional for TCP/IP comm using whatever socket > implementation I find most suitable. > MSEgui also has nonblocking socket components with ssl support. Please compile MSEide with -dmse_with_ifirem in order to activate them. It also has "tnoguiapplication" in order to build daemon applications with an event loop where all nonvisual components including ttimer can be used. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Cross-compiling for Raspberry Pi2
On Friday 18 September 2015 16:14:35 Bo Berglund wrote: > I have not really used Lazarus except for some hello world tests and > for checking how to port a Sentinel dongle function to FPC. > Now that is a chance to use MSEide instead. ;-) MSEide runs amazingly fast on Raspberry Pi and has very good suport for development of embedded and microprocessor projects written in Pascal or C, cross development with MSEide is very comfortable. I use it daily for different ARM and AVR32 projects. With MSEgui you also have a state of the art cross platform GUI toolkit with excellent database options at your fingertips. MSEgui probably is the most versatile GUI toolkit on the market. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Cross-compiling for Raspberry Pi2
On Friday 18 September 2015 16:08:20 Martin Schreiber wrote: > 2. Port the FPC Windows to FPC Linux X86 on a Linux X86 PC. 2. Port the FPC Windows application to FPC Linux X86 on a Linux X86 PC. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Cross-compiling for Raspberry Pi2
On Friday 18 September 2015 15:44:40 Bo Berglund wrote: > On Fri, 18 Sep 2015 11:02:23 +0200, Michael Schnell > > What would be the best way in your view? 1. Port the Delphi 7 application to FPC Windows X86 on a Windows X86 PC. 2. Port the FPC Windows to FPC Linux X86 on a Linux X86 PC. 3. Cross compile and cross debug the Linux application to RaspberryPi on the Linux X86 PC. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Cross-compiling for Raspberry Pi2
On Friday 18 September 2015 01:28:16 Bo Berglund wrote: > I have a need to port a Delphi console program written for Windows to > be used on Raspberry Pi2. > Apparently it is possible to use Freepascal to get programs running on > the Pi2 platform, but can it be done in Windows so I don't have to > install the complete IDE on a Pi and set it up with a monitor, > keyboard and mouse just for running the compile? > On Linux X86 you could use MSEide and the FPC cross compiling environment from here: http://mseide-msegui.sourceforge.net/pics/crossarm.png http://sourceforge.net/projects/mseide-msegui/files/fpcrossarm/ I assume it is possible to make something similar for Lazarus and Windows, I don't know if it already exists. For integrated development with FPC 3.0.1 MSEide+MSEgui git master version is necessary: https://gitlab.com/mseide-msegui/mseide-msegui >From MSEide+MSEgui README.TXT: " Crosscompiling and remote debugging i386-linux -> arm-linux *** For Raspberry Pi: - Establish a ssh login without password (public key authentication). - On the i386-linux host install the scp program - download and extract http://sourceforge.net/projects/mseide-msegui/files/fpcrossarm/crossfpc-i386_linux-eabihf_3_0_1.tar.gz to . - Start MSEide, in 'Settings'-'Configure MSEide'-'Global Macros' add: Name Value CROSSMSEDIRCROSSFPCDIR HOSTIP REMOTEIP REMOTEPORT REMOTEUSER pi - 'Project'-'New'-'From Template', select "crossarmdefault.prj" or "crossarmconsole.prj". - Create the new project. - 'Project'-'Options'-'Macros', set the TARGETPROJECTDIR value to the project path in remote target, ex: "/home/pi/proj/testcase". - Check the TARGETENV macro. - If your application needs additional libraries copy them from Raspberry Pi /lib/arm-linux-gnueabihf or /usr/lib/arm-linux-gnueabihf to /eabihf/lib Press F9 and hope the best. ;-) " MSEide+MSEgui also runs amazingly fast natively on the Raspberry Pi, the limiting factor is FPC compiling speed and memory consumption especially for smart linking. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] BreakIf
On Sunday 29 March 2015 23:39:58 Graeme Geldenhuys wrote: On 2015-03-27 12:45, JuuS wrote: I use this work-around because Condition Breakpoints still ain't fully implemented in Lazarus IDE or MSEide. They *are* implemented. The problem you probably refer to is that gdb uses the pointer values instead of the text for string comparisons. What I fear more is that the FPC-gdb combination can not show class fields anymore. http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#Bugs_in_GDB https://sourceware.org/bugzilla/show_bug.cgi?id=17835 The problem still exists in gdb 7.9.0. Possible workarounds are sub-optimal specifically for multi-language IDEs. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Ways of making new style design
On Monday 23 March 2015 21:47:25 Felipe Monteiro de Carvalho wrote: On Mon, Mar 23, 2015 at 9:35 PM, Graeme Geldenhuys mailingli...@geldenhuys.co.uk wrote: For full customisation and theme support, use a GUI toolkit that was designed for that purpose. fpGUI Toolkit (see the URL below) Please don't use our mailling list for propaganda of unrelated software, fpgui has its own communication channels, use them to talk about fpgui. Do you remember the times when you helped Delphi people in the Borland news-groups to find the Lazarus alternative? ;-) Competition is a good thing, don't you think? fpGUI and MSEgui both are opensource and have the same licence as Lazarus, all use Free Pascal and a broader spectrum of toolkits is a plus for the Free Pascal community. Most Free Pascal users don't know alternatives because of the historical overwhelming visibility of Lazarus, a post with the words fpGUI, MSEide+MSEgui and the names of other Free Pascal non Lazarus projects in the Lazarus channels is no harm for the Free Pascal community IMO, as you did it for Lazarus in the Delphi channels when Lazarus wasn't so well-known. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Ways of making new style design
On Monday 23 March 2015 21:43:00 aradeonas wrote: Graeme I check fpGUI in past two years but if I want to be honest even its screenshot's doesn't impressed me enough because I think with my self I cant do such the example link that I sent with fpGUI,Is it possible to make something look like that?Was I terribly wrong? About MSEgui I didnt know it,I will check it.Thank you. XelPlayer has been made with MSEide+MSEgui: http://almin-soft.ru/index.php?multimedia-programmy/xelplayer/xelplayer15-screenshots As Graeme writes, MSEgui has a radical other approach for style themes. Please ask questions about MSEide+MSEgui on the mailing list: https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk Mail archive: http://www.mail-archive.com/mseide-msegui-talk%40lists.sourceforge.net/maillist.html Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How to cast a Interface to a Object in Lazaeus
On Friday 13 March 2015 10:49:43 aradeonas wrote: OK,So in the end how can I cast a Interface to a Object in Lazarus? I usually add a function getinstance(): theBaseImplemetationClass to the interface definition. BTW, your patience is admirable. :-) Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How to cast a Interface to a Object in Lazaeus
On Friday 13 March 2015 11:06:19 Michael Van Canneyt wrote: On Fri, 13 Mar 2015, Martin Schreiber wrote: On Friday 13 March 2015 10:49:43 aradeonas wrote: OK,So in the end how can I cast a Interface to a Object in Lazarus? I usually add a function getinstance(): theBaseImplemetationClass to the interface definition. Which goes completely against the very purpose of interfaces. If you need this, you should not be using interfaces to begin with. The only possible excuse is an external requirement to use interfaces. I do not agree. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] [OT] Re: How to cast a Interface to a Object in Lazaeus
On Friday 13 March 2015 11:41:53 aradeonas wrote: @Martin and @Graeme if it is a sarcasm it is a good one.(Im not good at finding out sarcasm). No, it is no sarcasm from my side. In Free Pascal community sometimes one needs much patience if one does not comply with the main stream and I think you made it very good. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Multi-Device Designer
On Wednesday 25 February 2015 14:02:33 Mattias Gaertner wrote: On Wed, 25 Feb 2015 10:39:12 + Graeme Geldenhuys mailingli...@geldenhuys.co.uk wrote: On 2015-02-25 09:31, Mattias Gaertner wrote: Of course you can use VFI to create custom views - for different platforms, devices, releases or whatever flavors. But the difference between Delphi and Lazarus would be how you reference those forms. In Delphi FMX (as far as I understand) you would simply reference your form as SomeForm - regardless of the target device. FMX would resolve that automatically to the correct device specific implementation if one exists. I guess, but I only saw the promotion video, so maybe it is not that simple. If someone wants the same in Lazarus: For example the {$R *.iPhone4in.fmx IOS} directive can be replaced with {$ifdef iphonesim}{$R *.iphone4in.lfm}{$endif} The LCL (or msegui or whatever GUI lib) needs to be extended to search and load the second lfm resource. That needs only a few lines of code. And finally the IDE needs to be extended to load/update the secondary lfm. Whereas in Lazarus LCL's VFI you would have different units and different form names for each target. So you would have to wrap all those in IFDEF's. Is this correct? Well, you could do it without IFDEFs, but then all resources are compiled into the binary. Or you can load the lfm files via another mechanism. MSEi18n actually works with such an approach. It builds different resource-dll's/so's for different languages based on master form resource files (MSEgui counterpart of Lazarus *.lfm files) and a property table with a column for every language. The application loads the coresponding dll/so based on the language settings. Several years ago MSEi18n already has been used to adapt the gui of an application for different display environments: http://wiki.freepascal.org/MSEide__MSEgui#An_embedded_system It is planned to extend MSEi18n with a form designer in order to edit the widget properties graphically. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Failing to run GDB via IDE on OpenSUSE 13.2 system
On Monday 09 February 2015 18:28:59 Graeme Geldenhuys wrote: Hi, Last week I setup a new VM with OpenSUSE 13.2 64-bit. I also installed GDB (v7.8) from the standard package repository. See also http://bugs.freepascal.org/view.php?id=27188 Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TSQLQuery: Getting autoincremented ID value after insert (MySQL)
On Friday 14 November 2014 15:11:30 Michael Van Canneyt wrote: The idea is to add [pfRefresh] to providerflags. When doing an insert, the fields with this flag will be added to the RETURNING clause and used to update the buffer. I suggest [pfRefreshInsert,pfRefreshUpdate] as in MSEgui. MSEgui (and AFAIK Zeos) also automatically updates a simple master key field by LASTINSERTID if the DB supports it. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] nonlcl basic issue: is codetools LCL dependent?
On Friday 27 June 2014 21:04:13 Giuliano Colla wrote: I don't care too much about being modern. I claim that the best solution is always the most appropriate, not the newest. Tombstones are still made of stone. It's stone age technology, but it's the most appropriate up to now. Only if someone comes out with something better they will be finally dropped. When I'll find something more appropriate for my applications, I'll drop Kylix with no regrets. It seems to me that MSEide+MSEgui has been developed with exactly your requirements in mind. I actually have the same requirements. :-) Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Gdb and openocd via lazarus
On Wednesday 28 May 2014 12:36:57 Koenraad Lelong wrote: I tried to debug my arm-board with MSEide. I manually started openocd (I need to be root). Maybe it could be done by a root script with setuser flag in 'Project'-'Options'-'Debugger'-'Target'-'Start gdb server command run target'. I configured MSEide debugger : Target connection : extended-remote localhost:. Up to now I used remote only. I configured debug-target to the elf-file of my project. Is there a macro to add an extention to the make-output-file ? The gdb target file can be defined in 'Project'-'Options'-'Debugger'-'Debug Target' (as you did). There is a predefined macro ${EXEEXT} in 'Settings' for global access or define your own project specific macros in 'Project'-'Options'-'Macros'. It is possible to save such a customized project as template for future. MSEide project templates are normal project (*.prj)-files. I compiled the project and manually flashed it, and I left it in reset halt. I then can attach to the target, I see gdb connecting to openocd. I get the proper source in the source window. I can start the project, but since there seems still a problem with the compile-fase (the resulting binary does not work properly) I tried to reset the board. There gdb drops the connection to the target. When I set a breakpoint, the target halts, but MSEide does not indicate in the source where it stops. I can step, but again MSEide does not follow in the source. I can continue the target and stop it. But when I stop it, no indication where in the source it stopped. The searched source directories must be listed in 'Project'-'Options'-'Debugger'-'Source directories'. What shows the status line below the MSEide main menu? BTW, the MSEide+MSEgui mailinglist is here: https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk Archive and NNTP gateway: http://news.gmane.org/gmane.comp.ide.mseide.user I don't think the theme is appropriate for this list. ;-) Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Gdb and openocd via lazarus
On Wednesday 28 May 2014 12:36:57 Koenraad Lelong wrote: I tried to debug my arm-board with MSEide. I manually started openocd (I need to be root). Is the debug interface connected by USB? Then it is possible to setup an udev rule in order to allow non-root access. Copy a file to /etc/udev/rules.d, for the J-Link for example I named it 99-jlink_mse.rules, the content: ACTION!=add, SUBSYSTEM!==usb_device, GOTO=jlink_rules_end ATTR{idProduct}==0101, ATTR{idVendor}==1366, MODE=664, GROUP=users ATTR{idProduct}==0102, ATTR{idVendor}==1366, MODE=664, GROUP=users ATTR{idProduct}==0103, ATTR{idVendor}==1366, MODE=664, GROUP=users ATTR{idProduct}==0104, ATTR{idVendor}==1366, MODE=664, GROUP=users ATTR{idProduct}==0105, ATTR{idVendor}==1366, MODE=664, GROUP=users LABEL=jlink_rules_end lsusb -v lists the connected USB-devices with their device descriptor. The file provided by Segger did not work because of an unknown BUS variable and SYSFS instead of ATTR. I tried to connect an EFM32 board by openocd-J-Link-SWD-Chip, sadly the openocd J-Link driver supports JTAG only. :-( Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How to tell debugger what executable to use ?
On Wednesday 21 May 2014 12:21:41 Koenraad Lelong wrote: Hi, I'm trying to use lazarus as a debugging-frontend for arm-embedded. [...] P.S. is there a way to send monitor commands to the debugger ? That way I could program my chip. MSEide has support for such scenarios: http://mseide-msegui.sourceforge.net/pics/gdbtarget.png I use it with AVR ONE! and Segger J-Link interface. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Gdb and openocd via lazarus
On Wednesday 21 May 2014 16:43:23 Justin Smyth wrote: I can get lazarus to compile my project ok then I can openocd to flash my board , I can gdb connecting on port OK but I can't get it stop on any break points.. I don't know openocd, connection with gdb is described here: http://openocd.sourceforge.net/doc/html/GDB-and-OpenOCD.html#GDB-and-OpenOCD In MSEide the procedure is as follows - I assume same as in Lazarus: In 'Start gdb server command run target' write the command or script which starts the OpenOCD gdb proxy server (I don't know the command). Set 'Wait before connect' to the GDB server startup time + some reserve. 'Target connection' = remote localhost: Activate 'gdb download' then MSEide will use the gdb load command for program download. I suggest to make first a minimal C-program with the gcc toolchain of your target. If that works the FPC adventure can start. ;-) Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Windows.PostMessage vs Application.QueueAsyncCall
On Wednesday 19 March 2014 11:31:25 Michael Schnell wrote: The real issue is that in many cases you need to queue not only the call but the parameters for the call as well. Maybe have a look how it is done in MSEgui with tmseevent/tobjectevent, application.postevent() and friends? IIRC you already played with them? Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] *** GMX Spamverdacht *** Re: *** GMX Spamverdacht *** Re: Lazarus (UTF8) and Windows: SysToUTF8, UTF8ToSys... Is there a better solution?
On Saturday 28 December 2013 16:40:12 Jürgen Hestermann wrote: Am 2013-12-28 14:09, schrieb Florian Klämpfl: The people keeping FPC alive are those interested in Delphi compatibility. That seems to be the bottom line which makes any discussion useless. Don't write any opinions anymore they will be ignored anyway. All those who don't like the current developement should role their own. Let's split Pascal into hundreds of dialects instead of striving for an universal one. At least an honest statement. I also appreciate Florians always clear statements and made my decisions accordingly. :-) Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Beyond Compare 4 built with Lazarus 1.2
On Friday 27 December 2013 21:10:39 Marcos Douglas wrote: Resume: MSElang do no allow to cancatenate different string types (must be explicitely converted) Correct. and the RTL does not will use string8. Wrong. MSElang RTL suports string8 (utf-8), string16, (utf-16), string32 (UCS4) without preference. Additionally there is bytestring for any 8-bit encoding or binary data. Please remember, MSElang RTL is the bare minimum, file API for example must be implemented in the frameworks. So if I want to use Lazarus (LCL) with MSElang I will continue to have the need to convert all call from/to MSElang RTL because they have different encode. Is that right? No. You will use LCL as before. LCL implements the needed functions (file API for example) optimized for Lazarus purpose. As people who like to use MSEgui will use MSEgui functions which are optimized for use in MSEgui framework and fpGUI users probably can use a subset of LCL because fpGUI and Lazarus both use utf-8 and try to be mainstream compatible. It is possible that the framework developers work together in order to build commonly used base units and classes. It makes compiler and RTL-framework development somewhat independent. The close coupling of compiler and framework is necessary for a commercial software producer in order to optimize profit, opensource development does not need it. It is not necessary that the compiler and its environment dictate how the frameworks must be implemented. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Beyond Compare 4 built with Lazarus 1.2
On Saturday 28 December 2013 11:20:58 Marcos Douglas wrote: Wrong. MSElang RTL suports string8 (utf-8), string16, (utf-16), string32 (UCS4) without preference. Additionally there is bytestring for any 8-bit encoding or binary data. Please remember, MSElang RTL is the bare minimum, How do you will code this? Overload for each string type? Yes. file API for example must be implemented in the frameworks. I think this is an option even in FPC and Lazarus, ie, I see people, on the future, creating your own RTL because FPC and Lazarus do not agree about Unicode. :-) In MSEgui it has been done so from start for many RTL parts. Currently most of needed functionality is implemented in MSEgui units. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Beyond Compare 4 built with Lazarus 1.2
On Friday 27 December 2013 02:36:22 Marcos Douglas wrote: On Thu, Dec 26, 2013 at 6:06 AM, Martin Schreiber mse00...@gmail.com there are no implicit type conversions in MSElang. floatvariable:= floatvalue + integervalue; string8variable:= string8value + string16value; will not work and must be written as floatvariable:= floatvalue + float(integervalue); string8variable:= string8value + string8(string16value); You mean won't compile or raise an exception at runtime? Will not compile. The compiler then will do the conversions. The MSElang RTL is the bare minimum, most of the functionality (lists, file API...) is implemented in an optimized manner in the framework, in MSEgui for example, which already does not use much of the FPC RTL or - in a hypothetical case - in LCL. ;-) But what is the string type of MSElang RTL? If it will use string16 and my application uses string8 I will need to use conversion all the time, like SysToUTF8/UTF8ToSys functions... no? There will be not many functions with strings in MSElang RTL, most of them will be moved to the framework. BTW somebody can write a Delphi compatible framework-RTL if desired. The remaining string routines (mostly string comparison and the like) will have overloaded versions for string8, string16, string32 and maybe bytestring. Bytestring will assume 8-bit encoding of the current locale. RTTI will use bytestring with pure ASCII. If tcomponent (or its equivalence) is part of MSElang RTL (not yet decided), component names and the like also will use bytestring with pure ASCII. File API is not part of MSElang RTL. Every framework can use the stringtypes it likes, common RTL parts could be made in collaboration between the frameworks. Because MSElang compiler supports all without preference and the framework development does non need to wait on implementation decisions on complier or base-RTL level the development can be accelerated. It is apparent that such an approach is very unfeasible for a commercial compiler manufacturer because the loose of control. I assume that the Delphi architecture has been carfully chosen in order to maximize the control over the ecosystem. But for an opensource undertaking the MSElang principle could work. :-) Automatic conversions is good. I don't think so. One easily can see how problematic automatic type conversion is. It actually stalls Free Pascal development since several years. It is seldom used, to type the conversion functions in code is not a big deal and helps to identify problematic designs. IMHO should exist a global variable that have the default codepage -- It is not necessary. Because MSElang does not define and does not know the type string one can define string oneself or it is defined in the framework. Lazarus probably will write type string = string8; Although I would recommend to replace all GUI string types by lazstring and to define type lazstring = string8; MSE is string16 -- and the user can change. MSEgui will not use string. What is currently string in MSEgui will be changed to bytestring. GUI strings will remain msestring. Filenames will remain filenamety. The compiler needs this variable to use the default encode when the user concatenate two or more strings with different encode. So, RTL can be string16, apps string8, Windows API string16, whatever... but the compiler will convert all calls automatically. MSElang does not allow to concatenate different string types, they must be explicitely converted. string8var:= string8value + string8(string16value) + string8(bytestringvalue1) + //assumes encoding of the current locale cp1251toutf8(bytestringvalue2); //uses conversion function, //not part of MSElang RTL Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus (UTF8) and Windows: SysToUTF8, UTF8ToSys... Is there a better solution?
On Wednesday 25 December 2013 11:03:55 Jürgen Hestermann wrote: So UTF16 has all drawbacks of all encodings but no benefit (except that this awfull decision is used by Windows). This is not true. Everytime someone claims this nonsense I need to comment but I will not argue again. ;-) Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus (UTF8) and Windows: SysToUTF8, UTF8ToSys... Is there a better solution?
On Wednesday 18 December 2013 09:05:26 Michael Van Canneyt wrote: I would like to understand: Why Java, .Net and others use UTF-16 as default encode and why Lazarus team chose UTF-8? The impact of switching to UTF-8 is less when you care about backwards compatibility. I do not quite agree. Moving from single byte encoding to utf-8 breaks many non-English applications which use character index. MSElang supports string8 (utf-8), string16 (utf-16) string32 (UCS4) and bytestring (any 8 bit encoding and/or binary data). Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus (UTF8) and Windows: SysToUTF8, UTF8ToSys... Is there a better solution?
On Wednesday 18 December 2013 16:19:22 Marcos Douglas wrote: What more, UTF-16 is confusing because it has variations. It all is well explained here: http://www.utf8everywhere.org/ I will read, thanks. Read it with a grain of salt. ;-) It does not consider all aspects of the matter. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus (UTF8) and Windows: SysToUTF8, UTF8ToSys... Is there a better solution?
On Tuesday 17 December 2013 19:15:15 Jürgen Hestermann wrote: IMO it makes very much sense to use UTF8 (which Linux uses anyway) Warning: Linux uses array of byte for filenames, not utf-8 AFAIK. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] The future of desktop
On Saturday 30 November 2013 14:24:03 Andrew Brunner wrote: On 11/30/2013 02:08 AM, Martin Schreiber wrote: How MSEifi-remote works: - That's not how it *should* be done. Any logic code that can be executed should be executed by way of the client. If you use HTTPS as the transport mechanism, you can assume code is secure and just execute it. There is not so much program logic which must be coded. Most is done by the MSEgui components, the GUI anyway, then there is the whole palette of DB, data entry and data visualisation components. If one likes one can use client side Pascal Script for the rest of the business logic if one thinks that it is save enough. The server merely has to send the form resources, scripts and data. Although I must say that I still more like real applications. ;-) Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Can Lazarus IDE debugger attach to already running process?
Am 19.09.2013 13:20, schrieb Graeme Geldenhuys: Not sure if I'm doing wrong. I'll try with GDB command line and MSEide under Windows now. Better try on Linux. gdb on Windows is always a lottery... Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Can Lazarus IDE debugger attach to already running process?
On Wednesday 18 September 2013 17:49:23 Graeme Geldenhuys wrote: Hi, As the subject line says, can Lazarus IDE's debugger attach to a already running process? The running process is a program compiler earlier with Lazarus IDE. I know GDB [via CLI] can do this, but can you do it via the Lazarus IDE, so I have visual debugging? If one can, how do I do it? Instead of using DDD, in MSEide it is 'Target'-'Attach Process'. Hmm, I need to fix the captions of the process ID dialog... Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Delphi for Android
On Friday 16 August 2013 09:13:51 Michael Van Canneyt wrote: On Thu, 15 Aug 2013, Marco van de Voort wrote: On Thu, Aug 15, 2013 at 01:31:59PM +0200, Michael Van Canneyt wrote: From memory: Firemonkey is OpenGL based, everything custom drawn. The OpenGL ensures it runs on all platforms that use OpenGL. Afaik creating an opengl context or anything with fonts is already not portable. Maybe, but compared to doing everything yourself for all platforms, solving this is not a lot of work. AFAIK there is no simple OpenGL. There are many different implementations all with different extensions, limitations and bugs. Especially pixmap handling, which is important for 2D GUI graphics and often the base of font drawing, is a nightmare on OpenGL. It is difficult to achieve good performance on all devices. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Unicode branch
On Monday 01 July 2013 00:33:43 Hans-Peter Diettrich wrote: Graeme Geldenhuys schrieb: On 2013-06-30 17:25, Hans-Peter Diettrich wrote: I'm somewhat confused now. When an object has an definite last use, it should not matter when it is destroyed afterwards, sooner or later. The simplest example... You have code that executes when the Interface gets destroyed. Such coding style is asking for trouble :-( Working with autodestroyed objects is asking for trouble. ;-) Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Unicode branch
Am 26.06.2013 08:08, schrieb Michael Schnell: On 06/25/2013 03:14 PM, Sven Barth wrote: Yes, it will merely be an empty method then. If this really works and does not break anything, I wonder why this has not been implemented since long... Because then classes work like COM interfaces. Shudder. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compile project release with LCL custom optimization
On Sunday 14 April 2013 08:42:17 Zaher Dirkey wrote: What is B,M,1,2,..6, is it Build Modes also? The menu items 'Project'-'Make','Build','Make 1','Make 2','Make 3','Make 4'. http://mseide-msegui.sourceforge.net/pics/projectmenu.png Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compile project release with LCL custom optimization
On Saturday 13 April 2013 21:30:17 Graeme Geldenhuys wrote: On 2013-04-13 20:05, Zaher Dirkey wrote: Not worked for me, i Added $(ProjectOpts) to custom options in SynEdit package (same with my packages but i will take SynEdit as example) What i have I Have 2 build mode (Debug, Release) I use lots of build modes too... like I said, the Lazarus Package idea was more problems than anything else. Now I just define all source paths as needed. Hehe. :-) http://article.gmane.org/gmane.comp.ide.mseide.user/18779 ;-) And in IDE's like Maximus or MSEide, it makes such configurations dead simple. See the last image of the page below. http://fpgui.sourceforge.net/screenshots_apps.shtml If one likes to see the original: http://mseide-msegui.sourceforge.net/pics/optionsmake.png http://mseide-msegui.sourceforge.net/pics/optionsdirectories.png http://mseide-msegui.sourceforge.net/pics/optionsmacros.png Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] IUnknown and reference counting
On Thursday 21 March 2013 08:07:56 Hans-Peter Diettrich wrote: CORBA style interfaces have no required methods to implement, so in such a case general interface support can be added to a TObject descendant simply by including the interface name in the class declaration. Does this mean that CORBA interfaces are not reference counted at all, or you use them without reference counting? They are not reference counted. The descinator CORBA is misleading anyway. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] XanaNews port to Lazarus
On Tuesday 05 March 2013 21:57:46 Graeme Geldenhuys wrote: Please note... in most cases these types of programs work fine in their email mode, but their NNTP support seems to lag far behind. This is why I am now looking at dedicated NNTP-only clients as well. KNode from KDE 3.5? Works well for me. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Problems with Lazarus
On Tuesday 19 February 2013 09:17:59 Johann Spies wrote: My endeavour to return to Pascal is getting to the point of frustration: BTW there is another IDE with integrated debugging for FPC available which maybe can fulfill your needs. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Problem with zeos and sqlite-3
On Friday 15 February 2013 13:41:23 zeljko wrote: Thanks for the idea, sqlite3_column_type does the job, but now I have another error ... seem that step() doesn't know anything about some column types, even if I call sqlite3_column_type inside step() call I get empty column type result.eg. in one CREATE VIEW someview(blabla fields,CAST(0 AS INTEGER) AS myintfield, etc etc. ...) When I call that view I can see 0 in sqlite3 utility, but zeos returns it as empty string ahhh whatta mess. sqlite3_column_type() works for CAST(0 AS INTEGER) too in a select statement, just tested with MSEgui git master and Sqlite 3.7.12.1. Is the problem caused by VIEW? Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Problem with zeos and sqlite-3
On Sunday 17 February 2013 10:31:04 zeljko wrote: sqlite3_column_type() works for CAST(0 AS INTEGER) too in a select statement, just tested with MSEgui git master and Sqlite 3.7.12.1. Is the problem caused by VIEW? Didn't test 3.7, but 3.6.23. As I already mentioned it works ok for select ,but pragma table_info(''myview') does not work for casts returns empty type. CREATE VIEW testview AS select * ,cast(0 as integer) as nullint from table1 And then select * from testview in SQL property of tmsesqlquery returns ftinteger for the nullint field. Can you post a simple complete example? Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Problem with zeos and sqlite-3
On Sunday 17 February 2013 12:17:24 zeljko wrote: You misunderstood me. I returns ftIntger too when using SELECT, but WHEN using PRAGMA table_info('testview'); it does not return integer. So what returns tmsesqlquery in this case: CREATE VIEW testview AS select * ,cast(0 as integer) as nullint from table1; PRAGMA table_info('testview'); You should use sqlite3_column_type() instead of PRAGMA table_info(). Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Problem with zeos and sqlite-3
On Friday 15 February 2013 09:36:47 zeljko wrote: On Friday 15 of February 2013 00:29:01 luiz americo pereira camara wrote: I just tested with sqlite3ds and works fine. See test below. You may look at its source and see if the approach used can be adapted for zeos There's no problem with such approach, but as I already said it's not solution for me since there's hundreds of dynamic queries and I have to rewrite all of them to get it work in that way (and that queries are used by pgsql too). Just in case, I added a check of sqlite3_column_type() if there is no existing fielddef. Seems to work for sum() statements. git master 81d976c8372a6654a3a2962e12d57c53eaac0176. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Problem with zeos and sqlite-3
On Thursday 14 February 2013 13:48:46 zeljko wrote: Hi, When using eg. sum(somecolumn) AS sum1, sum(somecolumn2) AS sum2 sqlite returns (zeos recognizes) result columns as string not as float. I've tried CAST(sum(somecolumn) AS REAL) AS sum1 but have same problem. If I use pure data from table (eg. item INTEGER,value float) then results are ok. I know that sqlite3_column_type() is tricky about correct results, but asking if someone have solution for this. In MSEgui the field type of ambiguous Sqlite3 columns can be defined by setting the fielddefs datatype. Maybe Zeos has a similar option? Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] terminal window not displayed in lazarus on kubuntu linux
On Saturday 19 January 2013 17:42:48 Martin wrote: That is all there currently is. Until someone has time to implement a nice terminal emulation in the IDE. MSEide uses xterm with the -S option if 'Project'-'Options'-'Debugger'-'External Console' is activated. I found no other terminal emulator which provides such an option. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] SQLDB - Can't attach second SQLite database because transaction
On Friday 11 January 2013 06:52:20 stdreamer wrote: On 7/1/2013 11:59 μμ, Michael Van Canneyt wrote: Ah yes. Good point, had not though of that. Well, let's add the bypass then. Just need to figure out what to do with Firebird, since it needs transactions. Probably temporarily creating one and committing it at the end will do. Michael. Personally I disagree, that behavior is exactly the opposite of what the method name imply and I would simply raise an exception instead with a message of : firebird does not support out of transaction commands, or something along those lines also I would like to propose an other alternative, Instead of adding one more method I would extend the existing one with an extra parameter Transaction:TSQLTransaction if the parameter is nil then it will run outside of a transaction if supported by the database or raise an exception. MSEgui transaction component has an option tao_fake which can be used in situations where statements should run in an implicit transaction. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] toolbar and toolbutton issues
On Wednesday 05 December 2012 20:39:55 Graeme Geldenhuys wrote: MSEgui is infinitely more complicated to use in general, yet I figured out how to setup a toolbar faster in MSEide MSEgui, than I did in Lazarus with LCL. No offence meant to the Martin (MSEgui developer), but that should say something to the LCL developers. BTW, Graeme: If you search for toolbar inspirations, in MSEgui there is ttoolbar for equally sized buttons without captions, tmainmenuwidget for buttons with captions and tdockpanel in tdockpanel.dragdock.options od_nofit and banded mode in order to to place runtime sizeable and moveable widgets of arbitrary class. Please note that tdockpanel adjusts child widget positions and sizes at runtime only. Also not very intuitive but a necessary flaw. ;-) Press Shift while clicking on the sizing grips in order to move the widgets at runtime. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] New user interface for future major releases of Lazarus
Am 04.12.2012 06:59, schrieb Felipe Ferreira da Silva: I would like to propose and discuss about a new graphical user interface for the next major releases. Nowadays, most of the RAD tools use a docked interface(MonoDevelop, Delphi, VS), and in some cases they are stylish(like the recent Visual Studio versions). I think that a better-looking IDE would not just make the programming task more pleasant, but also could attract more people to Pascal. May I recommend a third solution than fully docked/undocked? MSEide has a menu item 'View'-'Panels'-'New Panel' which creates a new empty dock container where tool windows and other panels can be placed. So one can create groups of windows which can be layered or tabbed, please see the screenshots on Sourceforge. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] OpenSUSE KDE keeps stealing my IDE shortcuts
On Monday 30 July 2012 15:20:53 Graeme Geldenhuys wrote: So I'm trying OpenSUSE 12.1 (64-bit), and so far the OS is stable, but KDE is still something to get used to. BTW, KDE 3.5 for OpenSUSE 12.1 is here: http://en.opensuse.org/KDE3 Highly recommended. :-) Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Displaying text with colour and insertion point
On Wednesday 16 May 2012 19:37:16 Mark Morgan Lloyd wrote: It sounds like a lot of work, shoehorning something which isn't really its forte into Synedit. Before anything more, I'll drop a note to Cmdline's author (if he's not in here already) and see if he's got any suggestions. Otherwise, can anybody say whether are there any stringgrid derivatives etc. that will do this? It probably will not help you but MSEgui has tterminal for the purpose. It is based on the tcustomtextedit widget. tcustomtextedit and its descendents (ttextedit, tundotextedit, tsyntaxedit, tterminal...) should be placed into a twidgetgrid and builds a text editor column in the grid. The underlying cell datatype is richstringty, a UnicodeString with per character font style and color info. tterminal can start processes and read and write pipes. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Postgresql listen/notify
On Tuesday 08 May 2012 01:04:06 Leonardo M. Ramé wrote: Hi, does sql-db allows to capture PostgreSql notify events?. If yes, how?. MSEgui fork of sqldb has tdbevent component, see lib/db/msedbevents.pas. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TImage - Getting image properties in 'canvas space'
On Thursday 19 April 2012 09:52:30 michael.vancann...@wisa.be wrote: On Thu, 19 Apr 2012, Graeme Geldenhuys wrote: On 19 April 2012 00:04, Alberto Narduzzi albertonardu...@yahoo.com wrote: An interface to a class (or its concept, anyway) is there for a reason. And you should adhere to. I may also say that if you need to access a protected, or private for what is worth, member of a (library...) class, then you should revise your code... because either you're using the wrong class, or your problem can be solved in a different, possibly more elegant, and surely more OO compliant way ;-) I totally disagree... :) type // Friend class to get access to protected methods THackCustomEdit = class(TCustomEdit); The Hack says it all. Here you are working outside regular OOP rules. The correct way would have been an implementation for each descendent of TCustomEdit. You just took a shortcut. Nothing wrong with that by itself, but basing an argument about general OOP rules on a shortcut implementation is incorrect reasoning. In a system with stricter rules, you would have had to solve it differently. May I repeat the idea of friend units? While designing a complex framework like Lazarus, fpGUI or MSEgui there constantly is the need to access low level functions from other classes. Now one has the options to write the whole framework in a single unit (ex. db.pas), to make most of the class elements public or to use local alias type definitions. For me public class elements should be user suitable and safe. I don't think it is a good idea to place elements the user of the framework normally should not touch to public. And I don't think that in a project of that dimension it is possible to maintain a completely clean OOP structure with an acceptable effort. The introduction of friend units would be a simple solution. In friend units the protected class members would be visible. So if you build a framework and you know what you do, list the base units of the framework as friends of higher level units of the same framework. Users of the framework don't need friend units and can use the public class elements in a save manner. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TProcess, UTF8, Windows
On Sunday 15 April 2012 11:32:21 Mattias Gaertner wrote: cpstrnew is part of fpc 2.7.1 and Lazarus runs fine with it since two months. The -Fcutf8 and {$codepage utf8} exists since ages. I meant the combination of -Fcutf8, cpstrnew, and the Lazarus UTF8String which should be possible in FPC trunk but is not fully tested up to now maybe. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TProcess, UTF8, Windows
On Sunday 15 April 2012 12:35:08 Mattias Gaertner wrote: On Sun, 15 Apr 2012 11:44:15 +0200 Martin Schreiber mse00...@gmail.com wrote: On Sunday 15 April 2012 11:32:21 Mattias Gaertner wrote: cpstrnew is part of fpc 2.7.1 and Lazarus runs fine with it since two months. The -Fcutf8 and {$codepage utf8} exists since ages. I meant the combination of -Fcutf8, cpstrnew, and the Lazarus UTF8String which should be possible in FPC trunk but is not fully tested up to now maybe. I'm not sure what you mean with the Lazarus UTF8String. There is UTF8String = type AnsiString(CP_UTF8) defined in system.pp. I assume Lazarus uses that string type everywhere where it expects utf-8, same as MSEgui uses msestring (=UnicodeString) everywhere it expects utf-16? Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TProcess, UTF8, Windows
On Sunday 15 April 2012 13:33:05 Mattias Gaertner wrote: On Sun, 15 Apr 2012 13:00:12 +0200 I assume Lazarus uses that string type everywhere where it expects utf-8, same as MSEgui uses msestring (=UnicodeString) everywhere it expects utf-16? UnicodeString has a clear advantage versus WideString (reference counting). I don't see the clear advantage of UTF8String. Using UTF8String instead of String (CP_UTF8 or CP_ACP) forces strings to CP_UTF8. This may slow down some assignments, may speed up some assignments or break some assignments. Now I don't understand, sorry. :-) UTF8String = type AnsiString(CP_UTF8), is there another string type with CP_UTF8? What is the definition of string in cpstrnew? AnsiString(CP_ACP)? http://wiki.freepascal.org/FPC_Unicode_support does not answer the question AFAIK. Hmm, I checked the Lazarus source, it seems I was wrong with the assumption that Lazarus uses UTF8String everywhere, it uses String instead, correct? Example: type TTranslateString = type String; TCaption = TTranslateString; TControl = class(TLCLComponent) [...] property Text: TCaption read GetText write SetText; TCustomEdit = class(TWinControl) [...] property SelText: String read GetSelText write SetSelText; Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TProcess, UTF8, Windows
On Sunday 15 April 2012 14:59:21 Mattias Gaertner wrote: Basically if you use utf8string you get a string that forces UTF-8. And if you use String (= AnsiString(CP_ACP) if my assumption about current FPC trunk is correct) it forces it to the 8bit system encoding. The only stringtype which does not enforce encoding is RawByteString. All AFAIK of course. ;-) Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TProcess, UTF8, Windows
On Sunday 15 April 2012 15:37:15 Marco van de Voort wrote: On Sun, Apr 15, 2012 at 03:24:32PM +0200, Martin Schreiber wrote: Basically if you use utf8string you get a string that forces UTF-8. And if you use String (= AnsiString(CP_ACP) if my assumption about current FPC trunk is correct) it forces it to the 8bit system encoding. The only stringtype which does not enforce encoding is RawByteString. All AFAIK of course. ;-) That's correct. But in Windows, you use Windows functions for conversion, and CP_ACP is a valid value there. On *nix, you first have to find out what the local encoding is, and it seems that Mattias is detecting a problem there. Be careful with assuming too much about RawBytestring being a normal type. In Delphi it is afaik only used in parameters (and function return values), more or less as a kind of open array type. There are no variables of the type rawbytestring defined. And probably Mattias is wrong if he thinks String in FPC trunk does not enforce encoding if I understood correctly. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TProcess, UTF8, Windows
On Monday 16 April 2012 00:04:41 Mattias Gaertner wrote: On Sun, 15 Apr 2012 15:58:24 +0200 Martin Schreiber mse00...@gmail.com wrote: And probably Mattias is wrong if he thinks String in FPC trunk does not enforce encoding if I understood correctly. string enforces an 8-bit type. It does not enforce a specific codepage like utf8string. At least under Linux. String = AnsiString(CP_APC), quote: Martin: And if you use String (= AnsiString(CP_ACP) if my assumption about current FPC trunk is correct) it forces it to the 8bit system encoding. The only stringtype which does not enforce encoding is RawByteString. All AFAIK of course. ;-) Marco: That's correct. Assign a CP_UTF8 and the string becomes CP_UTF8, assign a CP_ACP and it becomes CP_ACP, assign a CP_UTF16 and it becomes DefaultSystemCodePage. I have not tested under Windows. On most Linux CP_ACP is utf-8, on most Windows it is not utf-8. Probably we should wait until the dust has settled before drawing conclusions. We wait since several months. Anyway, as I wrote on lazarusforum.de, in the end it probably will be exactly like Delphi because Delphi compatibility has priority, maybe because several FPC core devels professionally work with Delphi. http://www.lazarusforum.de/viewtopic.php?f=10t=5855 Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TProcess, UTF8, Windows
On Saturday 14 April 2012 22:36:02 Marcos Douglas wrote: Well, works if I change this line: fname := 'c:\á b ç\á.txt'; to this: fname := UTF8Decode('c:\á b ç\á.txt'); And doesn't matter if fname is UnicodeString or string -- well, the debug hint to 'UnicodeString' is more beautiful than 'string' because the compiler translate. Add {$codepage utf8} to the unit header or compile with -Fcutf8, this is the default setting in MSEide+MSEgui for automatic Unicode handling. Warning: most likely this setting will break Lazarus on FPC 2.6.0. I don't know if Lazarus is fully tested with cpstrnew and -Fcutf8 already. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Development of other revision control + easy searching through mailing list archives
On Wednesday 11 April 2012 08:44:28 Dawson wrote: Ah ... another question I have is kind of a noob question, since I'm new on this list. Since I couldn't see any easy way of searching through the entire archive for this topic, I laboriously scanned each and every archive on the list for by SUBJECT. Is there an easier way to do this? (I tried googling with what I thought were reasonable search terms, but that didn't help either.) I guess I could download the whole kit kat and kaboodle and store them locally, but that is a bit of trouble and a bit of disk space. Any suggestions that would make this less cumbersome would be appreciated. http://www.mail-archive.com/lazarus%40miraclec.com/ Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Development of other revision control + easy searching through mailing list archives
Martin Schreiber wrote: On Wednesday 11 April 2012 08:44:28 Dawson wrote: Ah ... another question I have is kind of a noob question, since I'm new on this list. Since I couldn't see any easy way of searching through the entire archive for this topic, I laboriously scanned each and every archive on the list for by SUBJECT. Is there an easier way to do this? (I tried googling with what I thought were reasonable search terms, but that didn't help either.) I guess I could download the whole kit kat and kaboodle and store them locally, but that is a bit of trouble and a bit of disk space. Any suggestions that would make this less cumbersome would be appreciated. http://www.mail-archive.com/lazarus%40miraclec.com/ or http://news.gmane.org/gmane.comp.ide.lazarus.general -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Development of other revision control + easy searching through mailing list archives
Martin Schreiber wrote: On Wednesday 11 April 2012 08:44:28 Dawson wrote: Ah ... another question I have is kind of a noob question, since I'm new on this list. Since I couldn't see any easy way of searching through the entire archive for this topic, I laboriously scanned each and every archive on the list for by SUBJECT. Is there an easier way to do this? (I tried googling with what I thought were reasonable search terms, but that didn't help either.) I guess I could download the whole kit kat and kaboodle and store them locally, but that is a bit of trouble and a bit of disk space. Any suggestions that would make this less cumbersome would be appreciated. http://www.mail-archive.com/lazarus%40miraclec.com/ Bad luck today, this is a very old link. Better use http://www.mail-archive.com/lazarus%40lists.lazarus.freepascal.org/ sorry. ;-) Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Development of other revision control + easy searching through mailing list archives
On Wednesday 11 April 2012 09:33:06 Reinier Olislagers wrote: On 11-4-2012 8:44, Dawson wrote: See here for a message on an extended SVN class that might serve as a basis for porting functionality: http://www.mail-archive.com/fpc-pascal@lists.freepascal.org/msg28007.html I might well be interested in helping with a mercurial port... A FPC based git frontend is here: https://gitorious.org/mseuniverse/mseuniverse/trees/master/tools/msegit Screenhots and binaries: http://sourceforge.net/projects/mseuniverse/ Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Development of other revision control + easy searching through mailing list archives
On Wednesday 11 April 2012 12:45:46 Graeme Geldenhuys wrote: On 11 April 2012 10:20, Martin Schreiber wrote: A FPC based git frontend is here: https://gitorious.org/mseuniverse/mseuniverse/trees/master/tools/msegit I might be wrong, but I think the original poster was referring to a Source Code Management API for Lazarus IDE, making it possible for the Lazarus IDE to manage projects stored in SubVersion, Git, Mercurial and so forth. And there he needs to communicate with the git program, to parse the data what git returns, to build caches and the like where the MSEgit project provides GPL'ed Free Pascal code. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] SIGSEGV with Debug only
Am 31.03.2012 03:57, schrieb waldo kitty: On 3/30/2012 04:28, Martin Schreiber wrote: Am 30.03.2012 02:06, schrieb Daniel Simoes de Ameida: I'm using Debug Info as Auto (-g) and Display Line numbers (-gl), Heaptrace Unit is also active (-gh)in Debug mode ... Any hints ? Heaptrace fills freed memory with garbage. CurAnchorSide probably is in a object which already has been destroyed. ewww :( in my ancient mind, it would be better to fill with null for possible checks but then again ;) :P Actually it is $F0. The purpose is that $F0F0F0F0 as pointer should throw a SIGSEGV. Another heaptrace signature is $DEADBEEF. If you see this address in a pointer of your data structs there probably is something wrong. ;-) Martin Schreiber -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] SIGSEGV with Debug only
Am 30.03.2012 02:06, schrieb Daniel Simoes de Ameida: Hi All I have a strange issue... I'm currently using Lazarus 0.9.31 (update from SVN) with FPC 2.6.0 When I compile my application with debug information, I always get a SIGSEGV when closing one of my forms,on line 4805 of control.inc This Image http://imagebin.org/205899shows the error. However, when compiling without debug information, the errors do not occur (better this way) .. I'm using Debug Info as Auto (-g) and Display Line numbers (-gl), Heaptrace Unit is also active (-gh)in Debug mode ... Any hints ? Heaptrace fills freed memory with garbage. CurAnchorSide probably is in a object which already has been destroyed. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Grouping radio buttons
On Tuesday 20 March 2012 07:21:47 Jürgen Hestermann wrote: Hans-Peter Diettrich schrieb: I don't see how a user will recognize arbitrary radio button groups, with related buttons scattered across a form. Buttons in a panel or RadioGroupBox instead are naturally perceivable as related. Thus IMO the given model enforces a clearly structured GUI. When writing arbitrary I did not mean to randomly scatter them over the window. There can be multiple columns of radio buttons with text between them or other arrangements. The same question could be asked about TRadioButtons in general: Why can i put them *anywhere* although they are correlated? No visible connection is needed in this case. But it's only one group. No way to divide them into multiple groups. I would have expected a simple group number property that lets me set the group of some radio buttons to 1 and others to 2. MSEgui TRadioButton equivalent (tbooleaneditradio) has an integer group property as well. A useful feature. Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Can't compile trunk with fpc 2.4.5 under ubuntu
On Wednesday, 29. February 2012 08.55:55 Michael Schnell wrote: On 02/28/2012 04:13 PM, Sven Barth wrote: And instead of introducing yet another type or another special encoding we could just leverage the features FPC has today and use TBytes. I agree, if all features are in place: - its available out of the box (in the RTL) - it has all string functions in fully compatible way: - can do + (via operator overload) - can do pos(), copy(), delete() and friends via overloaded functions - conversion from and to Unicode String (via operator overload ? ) - conversion to pchar (how ? ) - does reference counting, lazy copy and auto re-alloc on resizing operations. - TByteStringList (are there more relevant string handling objects) is provided out of the box in a fully compatible and equally versatile way - no performance degradation. - conversion to AnsiString without move(). - conversion from AnsiString without move(). Martin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus