Re: [Lazarus] New LCL-CustomDrawn mailling list
On Wed, Mar 21, 2012 at 9:36 PM, Sven Barth pascaldra...@googlemail.com wrote: The only thing I miss currently (please correct me here if that changed already) are main menus (I don't know regarding other components). Basic support for Android native menus is easy, I even already have a initial code for this, it should be finished in the next few days. From your side what would really help at the moment would be a new target operating system android implemented in FPC trunk which is an exact copy of the linux operating system target except with these 2 revisions reverted from the android target: 16981 and 19036 These 2 revisions completely destroyed Android support in FPC and I was forced to make my own FPC branches because of them =( -- Felipe Monteiro de Carvalho -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Size of binaries etc.
Hans-Peter Diettrich wrote: Mark Morgan Lloyd schrieb: But the bottom line is that the target audience is IBM mainframe hackers, used to handcrafting assembler and punching EBCDIC with their teeth. I don't want them to say Binaries bigger than 1Mb? NBG. I wonder how mainframe applications can make use of a GUI at all? From my limited experience, either all or none :-) To a much greater extent than unix-based systems they rely on having smart terminals to do all the interactive stuff, and while waiting for something to happen sit there in a halted state (on a test system here, I see a something happen every couple of minutes spinning for a couple of thousand cycles). There's not very much difference between a 3270 terminal (and its equivalents from other manufacturers) and a classic web page with embedded forms: stuff gets sent to the terminal, the user fills fields in, changed areas get sent back. All of the frontend stuff can be wrapped in the same sort of GUI as a web browser gets, in fact IBM seem to have moved seamlessly to browsers rather than their classic terminals. It appears than many mainframe people make a virtue of the backends being written in assembler, for efficiency and- these days- geek cred. And up until around 2000, that assembler was pretty limited, e.g. all addressing was based on 12-bit offsets. These days a mainframe can run Linux, X11 and so on, but it's not what they were designed for and probably isn't the best way of using its specialised talents. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] SVN update conflicts
On Thu, 22 Mar 2012 02:55:05 +0100 Hans-Peter Diettrich drdiettri...@aol.com wrote: Mattias Gaertner schrieb: The Makefile.compiled must match the last compilation on the user machine. It doesn't make sense to use one from a compilation on a different machine. Using something from another machine is exactly what a binary distribution is about. How do you suppose that something compiled on a 64 bit Linux/gtk2 machine shall be used on a 32 bit Windows machine? Via cross compiling. Have you looked into a Makefile.compiled file? Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] New LCL-CustomDrawn mailling list
On Wed, Mar 21, 2012 at 09:36:53PM +0100, Sven Barth wrote: While I agree with you about the suprising end of Windows Mobile I don't think that your time was that much wasted. Without your support for WinCE I would not have been able to write our company application using Lazarus and also this way Lazarus can pose as one of the few RAD IDEs for Windows Mobile (or is it the only one even?). It might not mean much for many people (or even developers), but for me it's important to show what Lazarus (together with FPC) is capable of. I'd like to note that with a former employee, e did bid for porting the client part of a Delphi app to wince (but didn't get the bid in the end). As for the rest: chose your platforms carefully can be a different solution, which is why I avoid android till it comes in more stable waters (if ever) -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Compile error
Hello, I installed fpc 2.6.0 as root on Mandriva Linux 32 bit using the rpm packages FPC is running fine using the fp ide. I installed the Lazarus sources from svn update 36210 - $ cd lazarus - $ make clean all After a while a compile error occurs : -- Compiling /home/user/lazarus/packager/installpkgsetdlg.pas Compiling /home/user/lazarus/packager/confirmpkglistdlg.pas Compiling /home/user/lazarus/packager/newpkgcomponentdlg.pas pkgmanager.pas(3197,55) Error: Call by var for arg no. 1 has to match exactly: Got TLazPackage expected TIDEPackage pkgmanager.pas(4793) Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted make[2]: *** [lazarus] Error 1 make[2]: Leaving directory `/home/user/lazarus/ide' make[1]: *** [ide] Error 2 make[1]: Leaving directory `/home/user/lazarus/ide' make: *** [ide] Error 2 -- Do you know how to resolve this TLazPackage / TIDEPackage issue? Thanks -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compile error
On Thursday 22 of March 2012 09:03:08 ajv wrote: Hello, I installed fpc 2.6.0 as root on Mandriva Linux 32 bit using the rpm packages FPC is running fine using the fp ide. I installed the Lazarus sources from svn update 36210 - $ cd lazarus - $ make clean all After a while a compile error occurs : -- Compiling /home/user/lazarus/packager/installpkgsetdlg.pas Compiling /home/user/lazarus/packager/confirmpkglistdlg.pas Compiling /home/user/lazarus/packager/newpkgcomponentdlg.pas pkgmanager.pas(3197,55) Error: Call by var for arg no. 1 has to match exactly: Got TLazPackage expected TIDEPackage pkgmanager.pas(4793) Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted make[2]: *** [lazarus] Error 1 make[2]: Leaving directory `/home/user/lazarus/ide' make[1]: *** [ide] Error 2 make[1]: Leaving directory `/home/user/lazarus/ide' make: *** [ide] Error 2 -- Do you know how to resolve this TLazPackage / TIDEPackage issue? Already reported on lazdevel mailing list .. track commits and then try again ... I hope it will be fixed in next few hours (or if you don't have enough time to wait svn update -r 36200 ... that one works) zeljko Thanks -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Is it possible to drag and drop a web browser URL into a Lazarus app?
On 20 March 2012 16:37, Frank Church vfclists@... wrote: Is it possible to drag and drop a web browser URL into a Lazarus app? Are there some controls with that facility? In fpGUI is is handled just like any other DND action. Simply register what mime-type the drop target must look out for. It will then happile accept a drop action if such a mime-type is supplied. Simple and easy to use, and works on all platforms. Lazarus's drag-n-drop is based on the very limited Delphi / Windows DND, so is mainly build for in-app drag-n-drop, and not able to accept external drag-n-drop actions. Normally (in Delphi) you would have to revert to Windows API calls to get better DND support. I remember seeing them (the Lazarus team) extending the default limited DND a bit to support dropping files on a LCL app, but that is a far cry from complete DND support. Out of interest, I ran the DND Demo of fpGUI, which shows what mime-types the source of a DND action is willing to supply. I dragged the URL from the Chrome web browser and dropped in onto the Text Edit field. Below that is the complete list of mime-types (8 in total) that Chrome was willing to supply the data in. I don't know if this information will help you with your LCL application in any way. -- Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net attachment: Screenshot-Drop Site Demo.png-- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] New LCL-CustomDrawn mailling list
Am 22.03.2012 07:32, schrieb Felipe Monteiro de Carvalho: On Wed, Mar 21, 2012 at 9:36 PM, Sven Barthpascaldra...@googlemail.com wrote: The only thing I miss currently (please correct me here if that changed already) are main menus (I don't know regarding other components). Basic support for Android native menus is easy, I even already have a initial code for this, it should be finished in the next few days. Nice :D From your side what would really help at the moment would be a new target operating system android implemented in FPC trunk which is an exact copy of the linux operating system target except with these 2 revisions reverted from the android target: 16981 and 19036 These 2 revisions completely destroyed Android support in FPC and I was forced to make my own FPC branches because of them =( There is already work going on for an Android target. I don't know how well it comes along though. Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compile error
On Thu, 22 Mar 2012 09:05:54 +0100 zeljko zel...@holobit.net wrote: On Thursday 22 of March 2012 09:03:08 ajv wrote: Hello, I installed fpc 2.6.0 as root on Mandriva Linux 32 bit using the rpm packages FPC is running fine using the fp ide. I installed the Lazarus sources from svn update 36210 - $ cd lazarus - $ make clean all After a while a compile error occurs : -- Compiling /home/user/lazarus/packager/installpkgsetdlg.pas Compiling /home/user/lazarus/packager/confirmpkglistdlg.pas Compiling /home/user/lazarus/packager/newpkgcomponentdlg.pas pkgmanager.pas(3197,55) Error: Call by var for arg no. 1 has to match exactly: Got TLazPackage expected TIDEPackage pkgmanager.pas(4793) Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted make[2]: *** [lazarus] Error 1 make[2]: Leaving directory `/home/user/lazarus/ide' make[1]: *** [ide] Error 2 make[1]: Leaving directory `/home/user/lazarus/ide' make: *** [ide] Error 2 -- Do you know how to resolve this TLazPackage / TIDEPackage issue? Already reported on lazdevel mailing list .. track commits and then try again ... I hope it will be fixed in next few hours (or if you don't have enough time to wait svn update -r 36200 ... that one works) Fixed. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] New LCL-CustomDrawn mailling list
Am 22.03.2012 08:54, schrieb Marco van de Voort: On Wed, Mar 21, 2012 at 09:36:53PM +0100, Sven Barth wrote: While I agree with you about the suprising end of Windows Mobile I don't think that your time was that much wasted. Without your support for WinCE I would not have been able to write our company application using Lazarus and also this way Lazarus can pose as one of the few RAD IDEs for Windows Mobile (or is it the only one even?). It might not mean much for many people (or even developers), but for me it's important to show what Lazarus (together with FPC) is capable of. I'd like to note that with a former employee, e did bid for porting the client part of a Delphi app to wince (but didn't get the bid in the end). As for the rest: chose your platforms carefully can be a different solution, which is why I avoid android till it comes in more stable waters (if ever) I don't think that there is much choice for us regarding the target platform. You need to know that I'm talking about industrial devices here. Devices that are a bit more tough than usual smart phones and contain things like barcode scanners. Currently most vendors use Windows Mobile here (most prominent is Motorola Solutions with their Symbol series), but with the decline of that operating system the next best one for such devices is Android. This is also one of the reasons why we can't do a web interface for this: We need to access the (propritary) scanner hardware. Another reason is that some of our customers don't want a Wifi, etc. connection in their factories, etc. so a web service/page isn't an option then. Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] New LCL-CustomDrawn mailling list
On 21 March 2012 19:19, Felipe Monteiro de Carvalho felipemonteiro.carvalho@... wrote: then wrote a non-native Canvas, then the Android backend, etc, etc, and I finally achieved what I always wanted since 2006 at least: Can the Lazarus IDE now be compiled with the CustomDrawn widgetset, instead of GTK2, Qt4 etc? That would be cool if it is possible. -- Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] New LCL-CustomDrawn mailling list
Am 22.03.2012 10:01, schrieb Graeme Geldenhuys: On 21 March 2012 19:19, Felipe Monteiro de Carvalho felipemonteiro.carvalho@... wrote: then wrote a non-native Canvas, then the Android backend, etc, etc, and I finally achieved what I always wanted since 2006 at least: Can the Lazarus IDE now be compiled with the CustomDrawn widgetset, instead of GTK2, Qt4 etc? That would be cool if it is possible. From what I know about the CustomDrawn widgetset it's still to early (see my mail regarding the menus). But this would definitely be very cool on X11 based systems and I hope that Felipe and Co. will make this possible :D Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] New LCL-CustomDrawn mailling list
On 22 March 2012 11:04, Sven Barth pascaldragon@ wrote: From what I know about the CustomDrawn widgetset it's still to early (see my mail regarding the menus). But this would definitely be very cool on X11 based systems and I hope that Felipe and Co. will make this possible :D OK, thanks. @Felipe How did you handle Drag-n-Drop support is the CustomDrawn widgetset? Are you using each platform's native DND specifications / API, or did you implement something yourself (like the limited in-app DND only like what Delphi does). For interacting with other applications, using the native API will be a requirement. Also X11's DND specification requires a window handle per widget (but yes, toolkits like Qt4 and now GTK2 have overcome this with many hacks like fake window handles etc). -- Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Size of binaries etc.
On 21 March 2012 12:42, Mark Morgan Lloyd markMLl.lazarus@ wrote: A program built using (some version of) Delphi comes to about 317Kb, but even with a manual strip the best I can do with Lazarus/FPC is pushing 3Mb. Now for domestic consumption I can live with that, but I don't think it looks very good if I publish binaries for download, and by the time I've got to several different OSes, CPUs and widget sets it's taking a significant amount of storage. LCL is a heavy-weight toolkit (memory and size). If size is a serious issue, move over to a more light weight (here I mean size, not features) toolkit where you can still get 1MB executables. This is a big plus point for older WinCE devices where you only have 64-128MB user storage. fpGUI toolkit seems popular on the WinCE platform for exactly this reason [gauging this from user feedback I have received]. -- Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Size of binaries etc.
On Wed, Mar 21, 2012 at 10:02 PM, Mark Morgan Lloyd markmll.laza...@telemetry.co.uk wrote: Can't see it in trunk. Is it from an optional package? No, it is part of the standard IDE. For me it is right under Project Options. -- Felipe Monteiro de Carvalho -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Size of binaries etc.
Felipe Monteiro de Carvalho wrote: On Wed, Mar 21, 2012 at 10:02 PM, Mark Morgan Lloyd markmll.laza...@telemetry.co.uk wrote: Can't see it in trunk. Is it from an optional package? No, it is part of the standard IDE. For me it is right under Project Options. I don't see it here, on trunk built last night. Is that [Main menu] - Project - Project Options... and if so which page? -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Size of binaries etc.
Graeme Geldenhuys wrote: On 21 March 2012 12:42, Mark Morgan Lloyd markMLl.lazarus@ wrote: A program built using (some version of) Delphi comes to about 317Kb, but even with a manual strip the best I can do with Lazarus/FPC is pushing 3Mb. Now for domestic consumption I can live with that, but I don't think it looks very good if I publish binaries for download, and by the time I've got to several different OSes, CPUs and widget sets it's taking a significant amount of storage. LCL is a heavy-weight toolkit (memory and size). If size is a seriousissue, move over to a more light weight (here I mean size, notfeatures) toolkit where you can still get 1MB executables. This is abig plus point for older WinCE devices where you only have 64-128MBuser storage. fpGUI toolkit seems popular on the WinCE platform forexactly this reason [gauging this from user feedback I have received]. NO. Definitely not, under the circumstances. As I've already said: what I'm trying to do is showcase Lazarus for a community that is well-aware of Pascal but does not so far have an FPC port, if somebody wants to tinker with the programs I most definitely don't want him to have to download a hodgepodge of external libraries and packages. I'm by no means averse to something like fpGUI for local use, particularly for Chumby-style appliances- provided obviously that they're not swept into irrelevance by iPad and Android. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Size of binaries etc.
Am 22.03.2012 11:06, schrieb Mark Morgan Lloyd: Felipe Monteiro de Carvalho wrote: On Wed, Mar 21, 2012 at 10:02 PM, Mark Morgan Lloyd markmll.laza...@telemetry.co.uk wrote: Can't see it in trunk. Is it from an optional package? No, it is part of the standard IDE. For me it is right under Project Options. I don't see it here, on trunk built last night. Is that [Main menu] - Project - Project Options... and if so which page? It's part of the Cody package: http://wiki.lazarus.freepascal.org/Cody Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] [fpc-devel] Re: How to iterate through a TAvgLvlTree
Felipe Monteiro de Carvalho wrote: Can I add a routine to access the AvgLvlTree as an array? To make it a better substitute to TFPList in objects which offer an indirect interface to the internal list, such as TLazAccessibleObject. My idea is defining: Index zero = Tree.FindLowest Indez Count-1= Tree.FindHighest On each access store the last accessed node and if the next call wants a node index=oldindex+1 or -1 then just use: Tree.FindSuccessor(Node) Tree.FindPrecessor(Node) Because almost always I use the array access only to iterate in a loop. Lazarus has a TMap implementations where a AvgLvlTree is used for looking up items and has a own AvgLvlTreeItem which is a double linked list so items can be iterated. Tree.FindSuccessor(Node)/Tree.FindPrecessor(Node) can cause a lot of nodes traveled. Marc Non-ordened access ofcourse would be slow because it would require a loop till the index is found. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Memory corruption investigation
On Thu, Mar 22, 2012 at 1:13 AM, Mattias Gaertner nc-gaert...@netcologne.de wrote: Have you tried the keepreleased? I set it to true as the first item in my program code and also in an offending unit but couldnt see much of a difference. I suppose that I should look for which block contains $B73DE820 to see who allocated the memory, but there are no blocks in the listing: Marked memory at $B73DE820 invalid Wrong signature $ instead of 755D2E31 $08065DEB $08065EA7 $0805C898 $0812AAEC TLAZINTFIMAGE__DESTROY, line 3244 of intfgraphics.pas $08057AE2 $08057AE2 $0817E53E TCDWIDGETSET__DELETEOBJECT, line 863 of ./customdrawn/customdrawnwinapi.inc $0816DF2F DELETEOBJECT, line 181 of ./include/winapi.inc $080FDC2E TSHAREDRASTERIMAGE__FREEHANDLE, line 40 of ./include/sharedrasterimage.inc Heap dump by heaptrc unit 432 memory blocks allocated : 101773/102496 378 memory blocks freed : 92141/92816 54 unfreed memory blocks : 9632 True heap size : 786432 True free heap : 769024 Should be : 773296 Call trace for block $B73DD9C0 size 2160 $0805C898 $080DA2C7 TRAWIMAGE__EXTRACTRECT, line 1576 of graphtype.pp $08100EF3 TCUSTOMBITMAP__SETSIZE, line 342 of ./include/custombitmap.inc $08100360 TRASTERIMAGE__SETWIDTH, line 956 of ./include/rasterimage.inc $08080925 TCDDRAWER__SCALERASTERIMAGE, line 561 of customdrawndrawers.pas $08082120 TCDDRAWERANDROID__LOADRESOURCES, line 482 of customdrawn_android.pas $08080666 TCDDRAWER__CREATE, line 518 of customdrawndrawers.pas $08083265 CUSTOMDRAWN_ANDROID_init, line 759 of customdrawn_android.pas // The closest one is this first block, but still B73DD9C0 + 2160 is B73DE230 which is less then B73DE820 -- Felipe Monteiro de Carvalho -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Conditional compilation depending on Lazarus version?
Hi list, I'm sure I must be missing something. I want to compile some grid drawing stuff depending on whether a grid bug has been fixed - i.e. I want to do something like this: Had a look here: http://wiki.lazarus.freepascal.org/IDE_Macros_in_paths_and_filenames ... but that only seems to specify support for FPC version, not Lazarus version. Ideally, I'd be looking at something like: {$IF LAZARUSREVISION=36180} // Note: normally, grid DefaultDrawing property must be off to avoid duplicate drawing // This will result in duplicate drawing but should work. DefaultDrawing:=true; {$ENDIF} Is something like this possible, or is there an easier way of doing things? I realize that the code above will be compiled by FPC, not Lazarus; perhaps it is possible to set an environment variable LAZARUSREVISION and/or LAZARUSVERSION and get these into FPC macros in some way? Thanks, Reinier -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Size of binaries etc.
On 22 March 2012 12:09, Mark Morgan Lloyd markMLl.lazarus@ wrote: NO. Definitely not, under the circumstances. As I've already said: what No problem, just thought I would mention it. BTW: [just for comparison sake] By default a simple test app - one Form, one Button and one Label, produces a 800KB 64-bit executable under Linux using FPC 2.6.1. A 32-bit executable will probably be 30% smaller than that. This is just with smartlinking and strip enabled - no other optimizations. So I could probably reduce those sizes even more if I wanted to. tinker with the programs I most definitely don't want him to have to download a hodgepodge of external libraries and packages. Umm, you do know that LCL based apps have a HUGE dependency list compared to fpGUI ! So the hodgepodge of external libraries will be when using LCL, *not* when using fpGUI. --- $ cd fpgui_test $ ldd project1 linux-vdso.so.1 = (0x7fff2f1ff000) libX11.so.6 = /usr/lib/libX11.so.6 (0x7f4968959000) libXft.so.2 = /usr/lib/libXft.so.2 (0x7f4968744000) libfreetype.so.6 = /usr/lib/libfreetype.so.6 (0x7f49684bd000) libc.so.6 = /lib/libc.so.6 (0x7f496813a000) libfontconfig.so.1 = /usr/lib/libfontconfig.so.1 (0x7f4967f05000) libxcb.so.1 = /usr/local/lib/libxcb.so.1 (0x7f4967ce7000) libdl.so.2 = /lib/libdl.so.2 (0x7f4967ae3000) libXrender.so.1 = /usr/lib/libXrender.so.1 (0x7f49678d9000) libz.so.1 = /lib/libz.so.1 (0x7f49676c1000) /lib64/ld-linux-x86-64.so.2 (0x7f4968cb4000) libexpat.so.1 = /lib/libexpat.so.1 (0x7f4967498000) libXau.so.6 = /usr/lib/libXau.so.6 (0x7f4967294000) libXdmcp.so.6 = /usr/lib/libXdmcp.so.6 (0x7f496708d000) $ cd ../lcl_test $ ldd project1 linux-vdso.so.1 = (0x7fff769ff000) libpthread.so.0 = /lib/libpthread.so.0 (0x7fb813194000) libX11.so.6 = /usr/lib/libX11.so.6 (0x7fb812e5e000) libgdk_pixbuf-2.0.so.0 = /usr/lib/libgdk_pixbuf-2.0.so.0 (0x7fb812c41000) libgtk-x11-2.0.so.0 = /usr/lib/libgtk-x11-2.0.so.0 (0x7fb81261f000) libgdk-x11-2.0.so.0 = /usr/lib/libgdk-x11-2.0.so.0 (0x7fb812372000) libgobject-2.0.so.0 = /usr/lib/libgobject-2.0.so.0 (0x7fb812129000) libglib-2.0.so.0 = /lib/libglib-2.0.so.0 (0x7fb811e4b000) libgthread-2.0.so.0 = /usr/lib/libgthread-2.0.so.0 (0x7fb811c46000) libgmodule-2.0.so.0 = /usr/lib/libgmodule-2.0.so.0 (0x7fb811a41000) libpango-1.0.so.0 = /usr/lib/libpango-1.0.so.0 (0x7fb8117f7000) libcairo.so.2 = /usr/lib/libcairo.so.2 (0x7fb811574000) libatk-1.0.so.0 = /usr/lib/libatk-1.0.so.0 (0x7fb811352000) libdl.so.2 = /lib/libdl.so.2 (0x7fb81114e000) libc.so.6 = /lib/libc.so.6 (0x7fb810dcb000) /lib64/ld-linux-x86-64.so.2 (0x7fb8133d6000) libxcb.so.1 = /usr/local/lib/libxcb.so.1 (0x7fb810bad000) libgio-2.0.so.0 = /usr/lib/libgio-2.0.so.0 (0x7fb8108fa000) librt.so.1 = /lib/librt.so.1 (0x7fb8106f2000) libm.so.6 = /lib/libm.so.6 (0x7fb81046e000) libXext.so.6 = /usr/lib/libXext.so.6 (0x7fb81025c000) libXrender.so.1 = /usr/lib/libXrender.so.1 (0x7fb810052000) libXinerama.so.1 = /usr/lib/libXinerama.so.1 (0x7fb80fe4e000) libXi.so.6 = /usr/lib/libXi.so.6 (0x7fb80fc3e000) libXrandr.so.2 = /usr/lib/libXrandr.so.2 (0x7fb80fa35000) libXcursor.so.1 = /usr/lib/libXcursor.so.1 (0x7fb80f82a000) libpangocairo-1.0.so.0 = /usr/lib/libpangocairo-1.0.so.0 (0x7fb80f61d000) libXcomposite.so.1 = /usr/lib/libXcomposite.so.1 (0x7fb80f41a000) libXdamage.so.1 = /usr/lib/libXdamage.so.1 (0x7fb80f216000) libXfixes.so.3 = /usr/lib/libXfixes.so.3 (0x7fb80f01) libpangoft2-1.0.so.0 = /usr/lib/libpangoft2-1.0.so.0 (0x7fb80ede6000) libfreetype.so.6 = /usr/lib/libfreetype.so.6 (0x7fb80eb5f000) libz.so.1 = /lib/libz.so.1 (0x7fb80e948000) libfontconfig.so.1 = /usr/lib/libfontconfig.so.1 (0x7fb80e713000) libpcre.so.3 = /lib/libpcre.so.3 (0x7fb80e4e4000) libpixman-1.so.0 = /usr/lib/libpixman-1.so.0 (0x7fb80e28b000) libdirectfb-1.2.so.0 = /usr/lib/libdirectfb-1.2.so.0 (0x7fb80e007000) libfusion-1.2.so.0 = /usr/lib/libfusion-1.2.so.0 (0x7fb80ddfd000) libdirect-1.2.so.0 = /usr/lib/libdirect-1.2.so.0 (0x7fb80dbe4000) libpng12.so.0 = /lib/libpng12.so.0 (0x7fb80d9bc000) libxcb-render-util.so.0 = /usr/lib/libxcb-render-util.so.0 (0x7fb80d7b8000) libxcb-render.so.0 = /usr/local/lib/libxcb-render.so.0 (0x7fb80d5af000) libXau.so.6 = /usr/lib/libXau.so.6 (0x7fb80d3aa000) libXdmcp.so.6 = /usr/lib/libXdmcp.so.6
Re: [Lazarus] Size of binaries etc.
Sven Barth wrote: Am 22.03.2012 11:06, schrieb Mark Morgan Lloyd: Felipe Monteiro de Carvalho wrote: On Wed, Mar 21, 2012 at 10:02 PM, Mark Morgan Lloyd markmll.laza...@telemetry.co.uk wrote: Can't see it in trunk. Is it from an optional package? No, it is part of the standard IDE. For me it is right under Project Options. I don't see it here, on trunk built last night. Is that [Main menu] - Project - Project Options... and if so which page? It's part of the Cody package: http://wiki.lazarus.freepascal.org/Cody Thanks Sven, I'll look at that one later if nobody has any quick ideas. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] New LCL-CustomDrawn mailling list
Sven Barth wrote: Am 22.03.2012 08:54, schrieb Marco van de Voort: On Wed, Mar 21, 2012 at 09:36:53PM +0100, Sven Barth wrote: While I agree with you about the suprising end of Windows Mobile I don't think that your time was that much wasted. Without your support for WinCE I would not have been able to write our company application using Lazarus and also this way Lazarus can pose as one of the few RAD IDEs for Windows Mobile (or is it the only one even?). It might not mean much for many people (or even developers), but for me it's important to show what Lazarus (together with FPC) is capable of. I'd like to note that with a former employee, e did bid for porting the client part of a Delphi app to wince (but didn't get the bid in the end). As for the rest: chose your platforms carefully can be a different solution, which is why I avoid android till it comes in more stable waters (if ever) I don't think that there is much choice for us regarding the target platform. You need to know that I'm talking about industrial devices here. Devices that are a bit more tough than usual smart phones and contain things like barcode scanners. Currently most vendors use Windows Mobile here (most prominent is Motorola Solutions with their Symbol series), but with the decline of that operating system the next best one for such devices is Android. This is also one of the reasons why we can't do a web interface for this: We need to access the (propritary) scanner hardware. Another reason is that some of our customers don't want a Wifi, etc. connection in their factories, etc. so a web service/page isn't an option then. Unfortunately, most hardware designers don't have a clue when it comes to designing in an industrial level of robustness- we've seen forklifts put through wall-mounted boxes and shovels used to operate membrane keyboards. The result is that very often the only kit that's tough enough to do the job doesn't have enough of a UI for modern development tools. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Memory corruption investigation
Ok, now I found who is causing the problem =) function TCDWidgetSet.RawImage_CreateBitmaps(const ARawImage: TRawImage; out ABitmap, AMask: HBitmap; ASkipMask: Boolean): Boolean; var NewData: PByte; lRawImage: TRawImage; lBitmap: TCDBitmap; begin {$ifdef VerboseCDBitmap} DebugLn(Format(':[TCDWidgetSet.RawImage_CreateBitmaps] ARawImage.Description=%s', [ARawImage.Description.AsString])); {$endif} Result := False; ABitmap := 0; AMask := 0; // Copy the data if ARawImage.DataSize 0 then begin NewData := AllocMem(ARawImage.DataSize); - System.Move(ARawImage.Data^, NewData^, ARawImage.DataSize); end else NewData := nil; {$ifdef VerboseCDBitmap} DebugLn(Format(':[TCDWidgetSet.RawImage_CreateBitmaps] Data=%x Data size=%d NewData=%x', [PtrUInt(ARawImage.Data), ARawImage.DataSize, PtrUInt(NewData)])); {$endif} // this is only a rough implementation, there is no check against bitsperpixel lBitmap := TCDBitmap.Create; ABitmap := HBITMAP(lBitmap); System.Move(ARawImage, lRawImage, SizeOf(TRawImage)); lRawImage.Data := NewData; - lBitmap.Image := TLazIntfImage.Create(lRawImage, True); - Result := ABitmap 0; This shows like this in the log: :[TCDWidgetSet.RawImage_CreateBitmaps] Data=B73FCC90 Data size=3600 NewData=B73FE360 And later on: Marked memory at $B73FE360 invalid --- Same address! Wrong signature $ instead of AFB54FD8 $08065DDB $08065E97 $0805C888 $0812AADC TLAZINTFIMAGE__DESTROY, line 3244 of intfgraphics.pas $08057AD2 $08057AD2 $0817F638 TCDWIDGETSET__DELETEOBJECT, line 863 of ./customdrawn/customdrawnwinapi.inc $0816DF1F DELETEOBJECT, line 181 of ./include/winapi.inc $080FDC1E TSHAREDRASTERIMAGE__FREEHANDLE, line 40 of ./include/sharedrasterimage.inc I use AllocMem and TLazIntfImage uses: procedure TLazIntfImage.FreeData; begin if FDataOwner then ReallocMem(FRawImage.Data, 0) -- Felipe Monteiro de Carvalho -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] New LCL-CustomDrawn mailling list
On Thu, Mar 22, 2012 at 10:11 AM, Graeme Geldenhuys graemeg.li...@gmail.com wrote: From what I know about the CustomDrawn widgetset it's still to early (see my mail regarding the menus). But this would definitely be very cool on X11 based systems and I hope that Felipe and Co. will make this possible :D I will try this year to get the IDE partially working with it, at least I want the native menus, all dialogs, SynEdit and VoiceOver accessibility working in Mac OS X. I don't have plans for designer support right now. @Felipe How did you handle Drag-n-Drop support is the CustomDrawn widgetset? It is not currently implemented (and not a priority for me) -- Felipe Monteiro de Carvalho -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Conditional compilation depending on Lazarus version?
Reinier Olislagers wrote: Hi list, I'm sure I must be missing something. I want to compile some grid drawing stuff depending on whether a grid bug has been fixed - i.e. I want to do something like this: Had a look here: http://wiki.lazarus.freepascal.org/IDE_Macros_in_paths_and_filenames ... but that only seems to specify support for FPC version, not Lazarus version. Ideally, I'd be looking at something like: {$IF LAZARUSREVISION=36180} // Note: normally, grid DefaultDrawing property must be off to avoid duplicate drawing // This will result in duplicate drawing but should work. DefaultDrawing:=true; {$ENDIF} Is something like this possible, or is there an easier way of doing things? I realize that the code above will be compiled by FPC, not Lazarus; perhaps it is possible to set an environment variable LAZARUSREVISION and/or LAZARUSVERSION and get these into FPC macros in some way? I don't think so, in the general case. The Lazarus revision number can probably be found as a .inc in the ide directory, and post about 0.9.24 you can get the LCL version at runtime, but folding those back into something that could be used by a conditional will be problematic. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] New LCL-CustomDrawn mailling list
Am 22.03.2012 11:44, schrieb Mark Morgan Lloyd: Sven Barth wrote: Am 22.03.2012 08:54, schrieb Marco van de Voort: On Wed, Mar 21, 2012 at 09:36:53PM +0100, Sven Barth wrote: While I agree with you about the suprising end of Windows Mobile I don't think that your time was that much wasted. Without your support for WinCE I would not have been able to write our company application using Lazarus and also this way Lazarus can pose as one of the few RAD IDEs for Windows Mobile (or is it the only one even?). It might not mean much for many people (or even developers), but for me it's important to show what Lazarus (together with FPC) is capable of. I'd like to note that with a former employee, e did bid for porting the client part of a Delphi app to wince (but didn't get the bid in the end). As for the rest: chose your platforms carefully can be a different solution, which is why I avoid android till it comes in more stable waters (if ever) I don't think that there is much choice for us regarding the target platform. You need to know that I'm talking about industrial devices here. Devices that are a bit more tough than usual smart phones and contain things like barcode scanners. Currently most vendors use Windows Mobile here (most prominent is Motorola Solutions with their Symbol series), but with the decline of that operating system the next best one for such devices is Android. This is also one of the reasons why we can't do a web interface for this: We need to access the (propritary) scanner hardware. Another reason is that some of our customers don't want a Wifi, etc. connection in their factories, etc. so a web service/page isn't an option then. Unfortunately, most hardware designers don't have a clue when it comes to designing in an industrial level of robustness- we've seen forklifts put through wall-mounted boxes and shovels used to operate membrane keyboards. The result is that very often the only kit that's tough enough to do the job doesn't have enough of a UI for modern development tools. Our company itself is not buying the hardware. We are only supporting certain kinds of devices (currently only Windows Mobile 5.0 to 6.5.3 ones from Symbol (now Motorola Solutions)) and provide the software to our customers if they need it. We also have a true robust device as well though, but that is only - as you also mentioned - an embedded device with a custom programming environment and rather restricted interaction capabilities (compared to the Windows Mobile devices). Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Conditional compilation depending on Lazarus version?
Am 22.03.2012 11:32, schrieb Reinier Olislagers: Hi list, I'm sure I must be missing something. I want to compile some grid drawing stuff depending on whether a grid bug has been fixed - i.e. I want to do something like this: Had a look here: http://wiki.lazarus.freepascal.org/IDE_Macros_in_paths_and_filenames ... but that only seems to specify support for FPC version, not Lazarus version. Ideally, I'd be looking at something like: {$IF LAZARUSREVISION=36180} // Note: normally, grid DefaultDrawing property must be off to avoid duplicate drawing // This will result in duplicate drawing but should work. DefaultDrawing:=true; {$ENDIF} Is something like this possible, or is there an easier way of doing things? I realize that the code above will be compiled by FPC, not Lazarus; perhaps it is possible to set an environment variable LAZARUSREVISION and/or LAZARUSVERSION and get these into FPC macros in some way? The revision is not possible (when using development versions you should try to use the latest revision), but for version you can use the unit LCLVersion. Just add it to the uses clause and then you can use e.g.: {$if lcl_fullversion=93100} // code that should work with 0.9.31 or newer {$endif} Just take a look at the unit to see which constants are supported (Note: it makes use of the feature that constants can be used in compiler conditionals) Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Conditional compilation depending on Lazarus version?
Op 22 maart 2012 11:50 heeft Mark Morgan Lloyd markmll.laza...@telemetry.co.uk het volgende geschreven: I don't think so, in the general case. The Lazarus revision number can probably be found as a .inc in the ide directory, and post about 0.9.24 you can get the LCL version at runtime, but folding those back into something that could be used by a conditional will be problematic. For examles using the version number, see: http://lazarus-ccr.sourceforge.net/docs/lcl/lclversion/index.html and http://svn.freepascal.org/svn/lazarus/trunk/examples/lclversion/ Vincent -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Size of binaries etc.
Mark Morgan Lloyd schrieb: Hans-Peter Diettrich wrote: Mark Morgan Lloyd schrieb: But the bottom line is that the target audience is IBM mainframe hackers, used to handcrafting assembler and punching EBCDIC with their teeth. I don't want them to say Binaries bigger than 1Mb? NBG. I wonder how mainframe applications can make use of a GUI at all? From my limited experience, either all or none :-) To a much greater extent than unix-based systems they rely on having smart terminals to do all the interactive stuff, and while waiting for something to happen sit there in a halted state (on a test system here, I see a something happen every couple of minutes spinning for a couple of thousand cycles). That's why I ask - the client-server protocol doesn't deserve a GUI on the mainframe. I also assume that the protocol restricts the graphics capabilities, if there are any. There's not very much difference between a 3270 terminal (and its equivalents from other manufacturers) and a classic web page with embedded forms: stuff gets sent to the terminal, the user fills fields in, changed areas get sent back. All of the frontend stuff can be wrapped in the same sort of GUI as a web browser gets, in fact IBM seem to have moved seamlessly to browsers rather than their classic terminals. IMO every client type requires a different protocol, and specific preparation of the data to be sent to the terminals. Doesn't this require an dedicated widgetset in the LCL, for every client type? This in turn would require to compile a Lazarus application separately, for all supported client types (widgetsets). Otherwise another layer between the (then abstract) LCL components and their transfer to specific client types had to be implemented in the LCL. DoDi -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Is it possible to drag and drop a web browser URL into a Lazarus app?
Graeme Geldenhuys schrieb: On 20 March 2012 16:37, Frank Church vfclists@... wrote: Is it possible to drag and drop a web browser URL into a Lazarus app? Are there some controls with that facility? In fpGUI is is handled just like any other DND action. Simply register what mime-type the drop target must look out for. It will then happile accept a drop action if such a mime-type is supplied. Simple and easy to use, and works on all platforms. Lazarus's drag-n-drop is based on the very limited Delphi / Windows DND, so is mainly build for in-app drag-n-drop, and not able to accept external drag-n-drop actions. Normally (in Delphi) you would have to revert to Windows API calls to get better DND support. I remember seeing them (the Lazarus team) extending the default limited DND a bit to support dropping files on a LCL app, but that is a far cry from complete DND support. Inter-process DD requires special assistance by the OS. IMO such operations are limited to drop file names, or other pure text, unless a platform offers something like OLE-DragDrop. DoDi -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] SVN update conflicts
Mattias Gaertner schrieb: How do you suppose that something compiled on a 64 bit Linux/gtk2 machine shall be used on a 32 bit Windows machine? Via cross compiling. Please stop kidding :-( How do the contributors to the repository know about *my* machine? Have you looked into a Makefile.compiled file? Yes, and obviously these have been altered by a local make or other operation. E.g. my Makefile.compiled and .fpc contains -dDoDi, so that both SVN and make are fooled when the versioned file contains different information about the compiled files. This became obvious only when SVN could not merge the local and remote versions of some of these auto-generated files. DoDi -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Memory corruption investigation
Ok, I found it! =D Fixed in rev 36215. -- Felipe Monteiro de Carvalho -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] SVN update conflicts
Hans-Peter Diettrich drdiettri...@aol.com hat am 22. März 2012 um 11:47 geschrieben: Mattias Gaertner schrieb: How do you suppose that something compiled on a 64 bit Linux/gtk2 machine shall be used on a 32 bit Windows machine? Via cross compiling. Please stop kidding :-( Sorry, but as you know the above case does not exist for the Lazarus binaries, so I thought you were making this up. As you know the Makefile.compiled is independent of widgetset/targetos/targetcpu. How do the contributors to the repository know about *my* machine? Have you looked into a Makefile.compiled file? Yes, and obviously these have been altered by a local make or other operation. E.g. my Makefile.compiled and .fpc contains -dDoDi, so that both SVN and make are fooled when the versioned file contains different information about the compiled files. This became obvious only when SVN could not merge the local and remote versions of some of these auto-generated files. As you know, the Makefile/Makefile.fpc/Makefile.compiled must be updated in sync and that it requires the newest fpc to update, because only that knows all targets. And that's why the auto update is disabled in all lpk of the Lazarus sources. The Makefiles are manually updated by the Lazarus developers - of course via the IDE/lazbuild. Maybe some lpk files have a bug and the auto update is enabled. Or maybe you updated them by accident. The Makefiles are updated very seldom, so your update may be a year old. Which lpk was wrong? Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Size of binaries etc.
On 22/03/2012 10:06, Mark Morgan Lloyd wrote: Felipe Monteiro de Carvalho wrote: On Wed, Mar 21, 2012 at 10:02 PM, Mark Morgan Lloyd markmll.laza...@telemetry.co.uk wrote: Can't see it in trunk. Is it from an optional package? No, it is part of the standard IDE. For me it is right under Project Options. I don't see it here, on trunk built last night. Is that [Main menu] - Project - Project Options... and if so which page? I think it's part of the cody package -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Is it possible to drag and drop a web browser URL into a Lazarus app?
On 22 March 2012 11:59, Hans-Peter Diettrich DrDiettrich1@... wrote: Inter-process DD requires special assistance by the OS. IMO such operations are limited to drop file names, or other pure text, unless a platform offers something like OLE-DragDrop. That shouldn't be a problem for Lazarus LCL then, seeing that everything is native and all Lazarus's target desktop platforms support inter-process DND - yet the full inter-process DND support in LCL is still missing. Will this be fixed before the 1.0 release? Most OS's these days can and do use mime-types (just like the whole internet does) for DND. But obviously each OS/platform has a different way in which they transfer data between processes (I guess this is what you meant by like OLE-DragDrop). Anyway, fpGUI uses mime-types for DND, for in-app and cross-process DND. Under Windows, I still have support for the older-style DND (eg: where data types are registered as STRING or WIDESTRING like the clipboard etc). In the case of fpGUI under Windows, I simply map those older data types to similar mime-types automatically. X11 uses mime-types as-is (so no mapping or trickery required under X11). Mac OS X also has mime-type DND support. What's nice about X11's DND support is that no data is generated or transferred until it is actually known that the drop target accepted the drop. Windows unfortunately is not that clever and generates the data resources when the DND action starts at the source, not when the drop target accepts the drop. So Windows is a bit waist-full with resources (what's new). -- Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Conditional compilation depending on Lazarus version?
Reinier Olislagers wrote: On 22-3-2012 11:57, Sven Barth wrote: Am 22.03.2012 11:32, schrieb Reinier Olislagers: The revision is not possible (when using development versions you should try to use the latest revision), but for version you can use the unit LCLVersion. Just add it to the uses clause and then you can use e.g.: {$if lcl_fullversion=93100} // code that should work with 0.9.31 or newer {$endif} Just take a look at the unit to see which constants are supported (Note: it makes use of the feature that constants can be used in compiler conditionals) Great, thanks, that works! At that point if there's an ./ide/revision.inc file containing // Created by Svn2RevisionInc const RevisionStr = '35880M'; can it be included into a unit to make it visible at compile time? And is there a way of getting $i to do something intelligent if the file it's looking for doesn't exist? -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Size of binaries etc.
Hans-Peter Diettrich wrote: Mark Morgan Lloyd schrieb: Hans-Peter Diettrich wrote: Mark Morgan Lloyd schrieb: But the bottom line is that the target audience is IBM mainframe hackers, used to handcrafting assembler and punching EBCDIC with their teeth. I don't want them to say Binaries bigger than 1Mb? NBG. I wonder how mainframe applications can make use of a GUI at all? From my limited experience, either all or none :-) To a much greater extent than unix-based systems they rely on having smart terminals to do all the interactive stuff, and while waiting for something to happen sit there in a halted state (on a test system here, I see a something happen every couple of minutes spinning for a couple of thousand cycles). That's why I ask - the client-server protocol doesn't deserve a GUI on the mainframe. I also assume that the protocol restricts the graphics capabilities, if there are any. In any event: in the current case all I'm doing is putting together a couple of developer-oriented programs that run on PCs. There's not very much difference between a 3270 terminal (and its equivalents from other manufacturers) and a classic web page with embedded forms: stuff gets sent to the terminal, the user fills fields in, changed areas get sent back. All of the frontend stuff can be wrapped in the same sort of GUI as a web browser gets, in fact IBM seem to have moved seamlessly to browsers rather than their classic terminals. IMO every client type requires a different protocol, and specific preparation of the data to be sent to the terminals. Doesn't this require an dedicated widgetset in the LCL, for every client type? This in turn would require to compile a Lazarus application separately, for all supported client types (widgetsets). Otherwise another layer between the (then abstract) LCL components and their transfer to specific client types had to be implemented in the LCL. I think we're at cross-purposes. As I said above, I'm currently not trying to have anything that runs on a mainframe, and neither am I trying to implement a general-purpose terminal emulator. /If/ there were an FPC port to run on a mainframe, it would see something roughly comparable to stdin/stdout (possibly using EBCDIC- let's not go there). /If/ I were trying to write a terminal emulator, then of course it would need to talk 3270 (possibly with SNA, or alternatively using the equivalent Burroughs etc. protocols). I'm not trying to do either of those things, but if I were then the clientside stuff could obviously be wrapped in a GUI in exactly the same way that HTTP/HTML is wrapped in a GUI or in the same way that AlphaWindows assumed a smart terminal with a GUI. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Size of binaries etc.
On 22 March 2012 13:04, Felipe Monteiro de Carvalho wrote: Even smaller then fpgui because LCL-CustomDrawn has it's own text rendering system =) Interesting, but unfortunately it seems LCL-CustomDrawn is still far from real-world usage, so I don't think it can be counted (yet). From what I have read, it doesn't seem feature complete or stable. eg: just dropping a TLabel on a TForm, gives me an instant crash at runtime. - $ gdb ./project1 GNU gdb (GDB) 7.1-ubuntu Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type show copying and show warranty for details. This GDB was configured as x86_64-linux-gnu. For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/... Reading symbols from /tmp/test2/project1...done. (gdb) break fpc_raiseexception Breakpoint 1 at 0x5c7380 (gdb) run Starting program: /tmp/test2/project1 WARNING: TLazIntfImage.ChooseRawBitsProc Unsupported BitsPerPixel=0 WARNING: TLazIntfImage.ChooseRawBitsProc Unsupported BitsPerPixel=0 WARNING: TLazIntfImage.ChooseRawBitsProc Unsupported BitsPerPixel=0 WARNING: TLazIntfImage.ChooseRawBitsProc Unsupported BitsPerPixel=0 Program received signal SIGSEGV, Segmentation fault. 0x005c6934 in fpc_do_is () (gdb) bt #0 0x005c6934 in fpc_do_is () #1 0x7fffcdd0 in ?? () #2 0x004d9681 in SELECTOBJECT (this=0x77f79040, DC=140737353524096, GDIOBJ=18446744073573964480) at ../../../../lazarus/lcl/interfaces/customdrawn/customdrawnwinapi.inc:5323 #3 0x0043ea23 in DRAWTEXT (this=0x77f79040, DC=140737353524096, STR=0x77ff1ad0 Label1, COUNT=6, RECT=..., FLAGS=352) at ../../../lazarus/lcl/include/intfbasewinapi.inc:744 #4 0x004c6399 in DRAWTEXT (DC=140737353524096, STR=0x77ff1ad0 Label1, COUNT=6, RECT=..., FLAGS=352) at ../../../lazarus/lcl/include/winapi.inc:216 #5 0x004939df in TEXTRECT (this=0x77f49cc0, ARECT=..., X=0, Y=0, TEXT=0x77ff1ad0 Label1, STYLE=...) at ../../../lazarus/lcl/include/canvas.inc:1312 #6 0x00552faa in PAINT (this=0x77f98ed0) at ../../../lazarus/lcl/include/customlabel.inc:473 #7 0x005288ae in WMPAINT (this=0x77f98ed0, MESSAGE=...) at ../../../lazarus/lcl/include/graphiccontrol.inc:64 #8 0x005c6e41 in SYSTEM_TOBJECT_$__DISPATCH$formal () #9 0x005287d8 in DESTROY (this=0x77f98ed0, vmt=0x7fffd338) at ../../../lazarus/lcl/include/graphiccontrol.inc:46 #10 0x0051c0e3 in PERFORM (this=0x77f98ed0, MSG=15, ---Type return to continue, or q return to quit--- WPARAM=140737353524096, LPARAM=0) at ../../../lazarus/lcl/include/control.inc:1402 #11 0x0050ca3f in PAINTCONTROLS (this=0x77f407f0, DC=140737353524096, FIRST=0x0) at ../../../lazarus/lcl/include/wincontrol.inc:4826 #12 0x0050c7d0 in PAINTHANDLER (this=0x77f407f0, THEMESSAGE=...) at ../../../lazarus/lcl/include/wincontrol.inc:4744 #13 0x005115b7 in WMPAINT (this=0x77f407f0, MSG=...) at ../../../lazarus/lcl/include/wincontrol.inc:6606 #14 0x00528f7d in WMPAINT (this=0x77f407f0, MESSAGE=...) at ../../../lazarus/lcl/include/customcontrol.inc:112 #15 0x005c6e41 in SYSTEM_TOBJECT_$__DISPATCH$formal () #16 0x00528f38 in ?? () #17 0x77f407f0 in ?? () #18 0x0001 in ?? () #19 0x000f in ?? () #20 0x7fffd910 in ?? () #21 0x77f407f0 in ?? () #22 0x0001 in ?? () #23 0x7fffdbc8 in ?? () #24 0x7fffe250 in ?? () #25 0x in ?? () (gdb) -- Removing the TLabel and replacing it with a TButton does work however. Though it produces some nasty X11 errors when I quit the application. -- $ ./project1 WARNING: TLazIntfImage.ChooseRawBitsProc Unsupported BitsPerPixel=0 WARNING: TLazIntfImage.ChooseRawBitsProc Unsupported BitsPerPixel=0 WARNING: TLazIntfImage.ChooseRawBitsProc Unsupported BitsPerPixel=0 WARNING: TLazIntfImage.ChooseRawBitsProc Unsupported BitsPerPixel=0 X Error of failed request: BadWindow (invalid Window parameter) Major opcode of failed request: 4 (X_DestroyWindow) Resource id in failed request: 0x840decc0 Serial number of failed request: 127 Current serial number in output stream: 128 -- Either way, interesting none the less. Just a quick glans at the LCL-CustomDrawn text code. It seems like a Object Pascal implementation of the FreeType library. Correct? Who did that work? And how up to date is it with the actual FreeType library? Are all FreeType library features implemented? glyph vector data extraction, bitmap fonts, anti-alias hinting,
Re: [Lazarus] Conditional compilation depending on Lazarus version?
Am 22.03.2012 13:28, schrieb Mark Morgan Lloyd: Sven Barth wrote: Am 22.03.2012 11:32, schrieb Reinier Olislagers: I realize that the code above will be compiled by FPC, not Lazarus; perhaps it is possible to set an environment variable LAZARUSREVISION and/or LAZARUSVERSION and get these into FPC macros in some way? The revision is not possible (when using development versions you should try to use the latest revision), but for version you can use the unit LCLVersion. Just add it to the uses clause and then you can use e.g.: {$if lcl_fullversion=93100} // code that should work with 0.9.31 or newer {$endif} For the record, can you easily say what version of FPC introduced this capability? According to a svn blame for the corresponding code this is in there at least since 2005 (when FPC switched from CVS to SVN and thus no older history is available to the public) Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Size of binaries etc.
On Thu, Mar 22, 2012 at 1:29 PM, Graeme Geldenhuys graemeg.li...@gmail.com wrote: Interesting, but unfortunately it seems LCL-CustomDrawn is still far from real-world usage, so I don't think it can be counted (yet). From what I have read, it doesn't seem feature complete or stable. eg: just dropping a TLabel on a TForm, gives me an instant crash at runtime. For me it works, strange. But I always use Mageia, never Ubuntu, probably LazFreeType failled to find the fonts in your system. Could you show me the output of locate .ttf ? (a stripped down version ideally with each dir occuring only once) Either way, interesting none the less. Just a quick glans at the LCL-CustomDrawn text code. It seems like a Object Pascal implementation of the FreeType library. Correct? Who did that work? And how up to date is it with the actual FreeType library? Are all FreeType library features implemented? glyph vector data extraction, bitmap fonts, anti-alias hinting, kerning, text rotation etc.. http://wiki.lazarus.freepascal.org/LazFreeType Yes, it is a modification of the original FreeType written in Pascal. circular from the forum wrote everything so I have no idea about your questions. You can ask the questions again in the LazUtils section of the forum and maybe he will answer: http://www.lazarus.freepascal.org/index.php/board,53.0.html Depending on the license, I might just take a look at that code too. ;-) http://wiki.lazarus.freepascal.org/LazFreeType#License There are no restrictions, but want credits. Maybe I'll implement a --credits command line option and consider it fullfilled. LCL-CustomDrawn-Android currently uses native text, so is unaffected by this requirement. -- Felipe Monteiro de Carvalho -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Size of binaries etc.
On 22 March 2012 13:04, Felipe Monteiro de Carvalho wrote: Even smaller then fpgui because LCL-CustomDrawn has it's own text rendering system =) But can it do this? ;-) [see attached screenshot] -- Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net attachment: fpGUI_text_rendering.png-- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] New LCL-CustomDrawn mailling list
On Thu, Mar 22, 2012 at 9:09 AM, Sven Barth pascaldra...@googlemail.com wrote: There is already work going on for an Android target. I don't know how well it comes along though. Are you sure that there is work going on on this? Could you point at any revisions? -- Felipe Monteiro de Carvalho -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Size of binaries etc.
On 22 March 2012 14:49, Felipe Monteiro de Carvalho wrote: Could you show me the output of locate .ttf ? (a stripped down version ideally with each dir occuring only once) I zipped the output to make it smaller. Sorry, I have no idea how to filter the output to only show unique directory paths. Your regex skills are probably better than mine. http://wiki.lazarus.freepascal.org/LazFreeType Yes, it is a modification of the original FreeType written in Pascal. Amazing what some people can do (or have time for). At least they prove that Object Pascal can do exactly what C/C++ can! :) Thanks for the information, I'll post some questions and take a close look at the code at some point. -- Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Size of binaries etc.
2012/3/22 Graeme Geldenhuys graemeg.li...@gmail.com: On 22 March 2012 13:04, Felipe Monteiro de Carvalho wrote: Even smaller then fpgui because LCL-CustomDrawn has it's own text rendering system =) But can it do this? ;-) [see attached screenshot] WOW!!! clap-clap-clap! Marcos Douglas -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Size of binaries etc.
On 22 March 2012 15:03, Marcos Douglas wrote: WOW!!! clap-clap-clap! :-) I wish I could take all the credit, but I can't. Milano did some excellent work with AggPas. I then incorporated it into fpGUI as one of the standard canvas classes (and made sure it's 100% backward compatible with the previous generation of Native API canvas classes). -- Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Conditional compilation depending on Lazarus version?
Sven Barth wrote: Am 22.03.2012 13:28, schrieb Mark Morgan Lloyd: Sven Barth wrote: Am 22.03.2012 11:32, schrieb Reinier Olislagers: I realize that the code above will be compiled by FPC, not Lazarus; perhaps it is possible to set an environment variable LAZARUSREVISION and/or LAZARUSVERSION and get these into FPC macros in some way? The revision is not possible (when using development versions you should try to use the latest revision), but for version you can use the unit LCLVersion. Just add it to the uses clause and then you can use e.g.: {$if lcl_fullversion=93100} // code that should work with 0.9.31 or newer {$endif} For the record, can you easily say what version of FPC introduced this capability? According to a svn blame for the corresponding code this is in there at least since 2005 (when FPC switched from CVS to SVN and thus no older history is available to the public) Which probably makes it safe for 2.2.4, which corresponds approximately to 0.9.24.1 by which time the new-format lcl_fullversion etc. were available. I was looking at these versions a few days ago, because I've got one project which I'm trying to keep compatible with GTK v1. Being to base coding decisions relating to e.g. Synedit capabilities on Lazarus rather than FPC version, without having to go to RTTI, is obviously a major advantage. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Size of binaries etc.
Am 22.03.2012 14:02, schrieb Graeme Geldenhuys: On 22 March 2012 14:49, Felipe Monteiro de Carvalho wrote: Could you show me the output of locate .ttf ? (a stripped down version ideally with each dir occuring only once) I zipped the output to make it smaller. Sorry, I have no idea how to filter the output to only show unique directory paths. Your regex skills are probably better than mine. Can it be that you forget the attachment? Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Conditional compilation depending on Lazarus version?
Am 22.03.2012 14:10, schrieb Mark Morgan Lloyd: Sven Barth wrote: Am 22.03.2012 13:28, schrieb Mark Morgan Lloyd: Sven Barth wrote: Am 22.03.2012 11:32, schrieb Reinier Olislagers: I realize that the code above will be compiled by FPC, not Lazarus; perhaps it is possible to set an environment variable LAZARUSREVISION and/or LAZARUSVERSION and get these into FPC macros in some way? The revision is not possible (when using development versions you should try to use the latest revision), but for version you can use the unit LCLVersion. Just add it to the uses clause and then you can use e.g.: {$if lcl_fullversion=93100} // code that should work with 0.9.31 or newer {$endif} For the record, can you easily say what version of FPC introduced this capability? According to a svn blame for the corresponding code this is in there at least since 2005 (when FPC switched from CVS to SVN and thus no older history is available to the public) Which probably makes it safe for 2.2.4, which corresponds approximately to 0.9.24.1 by which time the new-format lcl_fullversion etc. were available. These constants were introduced EXACTLY for the purpose to use them in ifdefs. So yes, they are safe to use in this way ;) Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Size of binaries etc.
On 22 March 2012 15:21, Sven Barth wrote: Can it be that you forget the attachment? Oops, the compression ratio was set to high. ;-) -- Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net locate_ttf.txt.tar.gz Description: GNU Zip compressed data -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] New LCL-CustomDrawn mailling list
Am 22.03.2012 13:51, schrieb Felipe Monteiro de Carvalho: On Thu, Mar 22, 2012 at 9:09 AM, Sven Barthpascaldra...@googlemail.com wrote: There is already work going on for an Android target. I don't know how well it comes along though. Are you sure that there is work going on on this? Could you point at any revisions? There was a mail on core some weeks ago by the same developer that has your bug assigned: http://bugs.freepascal.org/view.php?id=20726 It seems that he's working locally only though for now, so I can't point you to revisions. Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] [fpc-pascal] SQLdb: problem using GDB, but do not have memleak
On Wed, Mar 21, 2012 at 12:33 PM, Martin laza...@mfriebe.de wrote: On 21/03/2012 15:11, Marcos Douglas wrote: On Wed, Mar 21, 2012 at 12:01 PM, Martinlaza...@mfriebe.de wrote: So far I have no plans to update to 7.4 until either: - I find some existing problem solved in it - I start supporting new features However, my tests so far, have not shown any problems when using 7.4. So, when you move to 7.4 the only thing I need to do is update from SVN, right? yes. To everything work together between FPC 2.6.1 and Lazarus trunk, what are the best OPT options to compile both? I always used -gl and never had problems. Jonas said OPT=-O- -gl that is one more option. Well, I need to use this option(s) in Lazarus Build too. I use the IDE to do this. So, the right way is click in Configure Build and put the same OPT in Options box, is that right? Well do you want/need fpc with debug info? Yes, sometimes, to know what is happening in RTL. Do you want an example? http://bugs.freepascal.org/view.php?id=21529 If yes, then the fpc makefiles include -O2 and you need to cancel that. Because -O2 -O1 is still -O2, but -O2 -O-1 (or the long version -O2 -O- -O1) is -O1 Cool. Thank for this tip. In any case, that affects if you can inspect variables in the RTL. It does not seem to be related to the original issue Mind: rtl with debug info, will step into every ansistring_dec/inc_ref and similar. That can be highly annoying Yeah, I know... =) but I just put a new breakpoint in somewhere and press F9 to pass. But: rtl with debug info also allows to access some global vars (like the local time-date-format setting var) Whatever you do: -g defaults to stabs I recommend to not mix stabs and dwarf (it may work, but I do not know). So use the same for LCL, packages and app Maybe best to be explicit -gs -gw -godwarfsets -dwarf allows some properties (those directly mapped to a field) -stabs (and modern gdb) can do -gp (preserve the case of symbols, instead of getting the all caps stuff. I have NOT got a full list of diffs... OK, I'll play with this. Thank you very much. Marcos Douglas -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Size of binaries etc.
2012/3/22 Graeme Geldenhuys graemeg.li...@gmail.com: But can it do this? ;-) Well, mine can read your GPS position, accelerometer info and send SMSes in Android phones =D And it also works in Mac OS X with Cocoa ... And anyway, what people really want is the LCL, not yet another API. You can compare the download numbers and see. The Android VM Image already counts more then 2000 downloads... -- Felipe Monteiro de Carvalho -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Size of binaries etc.
Am 22.03.2012 14:02, schrieb Graeme Geldenhuys: On 22 March 2012 14:49, Felipe Monteiro de Carvalho wrote: Could you show me the output of locate .ttf ? (a stripped down version ideally with each dir occuring only once) I zipped the output to make it smaller. Sorry, I have no idea how to filter the output to only show unique directory paths. Your regex skills are probably better than mine. Now that you have attached your file I need to say: You don't need regex skills for that. The following program would have been sufficient: === program begin === program uniquepaths; {$mode objfpc}{$H+} uses sysutils, inifiles; var slist: THashedStringList; s: String; begin slist := THashedStringList.Create; try while not Eof(Input) do begin Readln(s); s := ExtractFilePath(s); if slist.IndexOf(s) 0 then begin slist.Add(s); Writeln(s); end; end; finally slist.Free; end; end. === program end === Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Is it possible to drag and drop a web browser URL into a Lazarus app?
Graeme Geldenhuys schrieb: On 22 March 2012 11:59, Hans-Peter Diettrich DrDiettrich1@... wrote: Inter-process DD requires special assistance by the OS. IMO such operations are limited to drop file names, or other pure text, unless a platform offers something like OLE-DragDrop. That shouldn't be a problem for Lazarus LCL then, seeing that everything is native and all Lazarus's target desktop platforms support inter-process DND - yet the full inter-process DND support in LCL is still missing. Will this be fixed before the 1.0 release? Feel free to file an feature request. What's nice about X11's DND support is that no data is generated or transferred until it is actually known that the drop target accepted the drop. Windows unfortunately is not that clever and generates the data resources when the DND action starts at the source, not when the drop target accepts the drop. So Windows is a bit waist-full with resources (what's new). You obviously don't understand OLE-DragDrop :-( DoDi -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] SVN update conflicts
Mattias Gaertner schrieb: As you know, the Makefile/Makefile.fpc/Makefile.compiled must be updated in sync and that it requires the newest fpc to update, because only that knows all targets. And that's why the auto update is disabled in all lpk of the Lazarus sources. The Makefiles are manually updated by the Lazarus developers - of course via the IDE/lazbuild. Sorry, I don't know nor understand what you try to say :-( The name Makefile.compiled suggests to me that it tracks the compiler options, used in the last compile. That compile takes place at the user machine. Maybe some lpk files have a bug and the auto update is enabled. Or maybe you updated them by accident. The Makefiles are updated very seldom, so your update may be a year old. Which lpk was wrong? I don't know, I reported the conflicted files initially. In components\projecttemplates\Makefile I found: # Don't edit, this file is generated by FPCMake Version 2.0.0 [2012/03/07] in the working base, while the working copy contains [2012/01/25] instead. The other directory, marked as modified, is components\fpcunit. No other directories flagged by TortoiseSVN, so far. I've reverted the entire components\ directory now, so that I can find out when the next modifications occur. DoDi -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Size of binaries etc.
2012/3/22 Graeme Geldenhuys graemeg.li...@gmail.com: Oops, the compression ratio was set to high. ;-) Are you using the latest Lazarus SVN? Because if it was a font or system compatibility issue then the button would not work. So I suspect you are using an old revision. -- Felipe Monteiro de Carvalho -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Size of binaries etc.
On 22 March 2012 13:04, Felipe Monteiro de Carvalho wrote: You can test for yourself lazarus-ccr/applications/lazclock/lazclock.lpi against LCL-CustomDrawn You cheated - the clock face is a PNG image. ;-) Here is a quick fpGUI version. :) Added features includes: anti-aliased line drawing for the clock arms. For good measure, I also added slight alpha blending (transparency) so you can see where the clock arms cross each other. http://opensoft.homeip.net:8080/~graemeg/fpGUI_Clock.png Next I'll work on recreating the clock face in pure Canvas painting routines (no PNG background image). I've always wanted a clock demo in fpGUI - what toolkit doesn't have a clock demo. :-D PS: Your clock demo crashes on my system when I run it, because it looks for the PNG file somewhere else in the system, instead of the current working directory 'skins'. Yes, when deploying an app, it is good practice to use the system resource folders, but for demos, they are normally self contained, so use local resources. -- Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Size of binaries etc.
On 22 March 2012 15:41, Sven Barth wrote: Now that you have attached your file I need to say: You don't need regex skills for that. The following program would have been sufficient: Rolling on the floor laughing! Once again, proof that Object Pascal can do everything other languages or tools can. :) -- Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Size of binaries etc.
On 22 March 2012 16:00, Felipe Monteiro de Carvalho wrote: Are you using the latest Lazarus SVN? A revision from last week. Is that too old? I'll get another Lazarus update, just in case. PS: I'm using 64-bit Linux with FPC 2.6.1 -- Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Ignoring all warnings from an entire directory
Is that possible? Something like *-vf$(LazarusDir)/components* to supress warnings from outside my project. It's not about ignore some kinds of warnings (like *-vm4055*), but ignore all warnings in files inside a directory. -- Atenciosamente, Alexsander da Rosa http://rednaxel.com -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Threads
Hi folks. Wen launching a thread, the process responsible for the thread object creation and the call to TThread.Start and the thread EXECUTE procedure, run in parallel. That's why the SYNCHRONIZE procedure exists and that the developer has to pay attention to not share code between threads. So far, so good. Now imagine that the EXECUTE procedure of a thread creates a useful object (TMyObject) with properties and methods. This thread is launched half a dozen times to process half a dozen simultaneous operations. My question is: How the properties and methods of the TMyObject created in every launched thread are they managed from one thread to another. As far as the data segment is concerned, no problem, I guess that every instance of the TMyObject has its own data in its thread address space: no mix. But what about the code and the local methods stack: will it be shared ? And if answer is yes, to what should I take care ? The question is far from trivial: I try to keep the EXECUTE procedure as small as possible and spread the code and data over a number of specialized units avoiding to load the EXECUTE procedure stack with heavy data ans structures. I apologize if my question doesn't sound very clear, but it's not even clear in my mind :-[ Antonio. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Ignoring all warnings from an entire directory
Alexsander Rosa alexsander.r...@gmail.com hat am 22. März 2012 um 15:30 geschrieben: -vf$(LazarusDir)/components to supress warnings from outside my project. It's not about ignore some kinds of warnings (like -vm4055 ), but ignore all warnings in files inside a directory. If it is about the components in the Lazarus directory: IMO all warnings/notes should be fixed. Either by code or by {%H-}. Any help is welcome. AFAIK there is no command line parameter to omit messages for directories. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Threads
Antonio Fortuny a.fort...@sitasoftware.lu hat am 22. März 2012 um 15:32 geschrieben: Hi folks. Wen launching a thread, the process responsible for the thread object creation and the call to TThread.Start and the thread EXECUTE procedure, run in parallel. That's why the SYNCHRONIZE procedure exists and that the developer has to pay attention to not share code between threads. So far, so good. Now imagine that the EXECUTE procedure of a thread creates a useful object (TMyObject) with properties and methods. This thread is launched half a dozen times to process half a dozen simultaneous operations. My question is: How the properties and methods of the TMyObject created in every launched thread are they managed from one thread to another. As far as the data segment is concerned, no problem, I guess that every instance of the TMyObject has its own data in its thread address space: no mix. But what about the code and the local methods stack: will it be shared ? And if answer is yes, to what should I take care ? Each thread has its own stack. All threads share the same address space and the same heap. Objects (here: class instances) are created on the heap. The heap is thread safe. The data segment is for constants. They are shared. The question is far from trivial: I try to keep the EXECUTE procedure as small as possible and spread the code and data over a number of specialized units avoiding to load the EXECUTE procedure stack with heavy data ans structures. I apologize if my question doesn't sound very clear, but it's not even clear in my mind :-[ Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Threads
Besides what the other said a very basic comment. The location where an object is defined (i.e. within a TThread enabled unit) or who created it (the main line code or the thread code) does not matter. The Concept of classes, objects and instances is a matter of memory allocation and pointers and not a concept of program flow. same is absolutely independent. You can use one instance of a class in one thread and another one in another thread. You can create an instance in one thread and call its procedures and properties by another one. (BTW this results in the fact that its very hard to define something like Thread-safe for a class). In fact you need to look exactly how the program flow of each thread is before deciding what code needs to be protected regarding mutual accesses by threads. Just looking at the objects does not help much, Looking at the point where an object is created does not help at all. -Michael -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Ignoring all warnings from an entire directory
2012/3/22 Mattias Gaertner nc-gaert...@netcologne.de ** If it is about the components in the Lazarus directory: IMO all warnings/notes should be fixed. Either by code or by {%H-}. Any help is welcome. Should I fix them on trunk or may I fix them on 0.9.30.4 release (that I am using)? It's easier to fix in the version I use on a daily basis, to fix in the trunk I would have to work only at weekends. -- Atenciosamente, Alexsander da Rosa http://rednaxel.com -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Conditional compilation depending on Lazarus version?
2012/3/22 Mark Morgan Lloyd markmll.laza...@telemetry.co.uk: At that point if there's an ./ide/revision.inc file containing // Created by Svn2RevisionInc const RevisionStr = '35880M'; can it be included into a unit to make it visible at compile time? You can add $(LazarusDir)\ide to the include paths of the project. Then this works: {$I revision.inc} const revIntroducedNewFeature = '5'; begin {$IF (RevisionStr = revIntroducedNewFeature)} UseNewFeature; {$ENDIF} end; -- cobines -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Size of binaries etc.
Felipe Monteiro de Carvalho wrote: I did some tests here and I guess this is simply the normal size of an app if you use ComCtrls. 1,5MB was for a minimal app with a form and some buttons. ComCtrls alone adds 1MB You can check this in the menu Project-Show used ppu files (might be 0.9.31+ only). You've hit it on the head. Cody shows that ComCtrls is being pulled in as part of LCLBase, even if none of its controls are being used (in the current case, the test form and associated unit are entirely empty). Shouldn't at least some of this be excluded by smartlinking? -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus