Re: [Lazarus] Error: illegal qualifier [ found
2010/1/21 Mattias Gaertner nc-gaert...@netcologne.de: fixed ... Fixed. Thank you! I can confirm that now it is ok! Best regards, Kjow -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] cross-distro (and OS) app installation - what would you like?
Graeme Geldenhuys wrote: George Lober wrote: that is easy to use by the average joe computer user whatever the platform is. It is an idea to cater to the end user and the software developer, and not some OSS or other status quo. Considering what the task is, it is understandable a large focus is on the Linux side of things because of the multitude of distros to target, and their associated different ways of doing things. 100% correct on both counts! Windows and Mac has it easy, because there is one governing body and a lot more standardized. Everybody keeps going on about how easy it is to install software on Windows or Mac. So yes, my idea of a new software installer might be more focused at Linux issue at this point in time, because that is where the most problems lie. The average Joe simply doesn't know how to install software on Linux and they hate the command prompt. A few years back, I myself was looking around to see if there was a user friendly Windows type, all-distro Linux installer available anywhere, in the same sense of what you are trying to do, and came up with nothing. The few that caught my eye were very basic, and not workable with closed source commercial software. http://developer.berlios.de/projects/fixinst/ http://autopackage.org/ I don't think these would fit your requirements. I mention these for curiosity's sake only. Besides the deployment issues, another thing that discourages me from writing software for Linux is the virtual non existence of anti-cracking software. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] cross-distro (and OS) app installation - what would you like?
On Thu, 21 Jan 2010 08:44:21 +0200 Graeme Geldenhuys graemeg.li...@gmail.com wrote: Mattias Gaertner wrote: * have other customization options during the install. Not easily at least. I have seen a handful of .deb packages that prompt for a Yes/No question, but that's about it. Most prompted in a console window (ugly) and one or two prompted in a GTK2 dialog (no idea how). The frontend can be anything. Some GUIs shows graphical dialogs for the questions. Point is, are all package management systems equal in there features. Does all of them support showing readme, custom questions, GUI dialogs etc? I don't know all systems. Other points: deb/rpm/ports/... repositories have some advantages: - mirrors - databases of all installed files - databases of all available files and packages - automatic update of all packages - automatic install of sets of packages And more points against repositories... * repositories are not meant for commercial software. At least I haven't seen any. And no the meta packages that simply install a script, that then has to use something like wget to download the actual commercial software doesn't cut it for us. eg: Microsoft Core Web Fonts .deb package. * You must have an internet connection (and a reasonably fast one at that). Realisticly, many South African internet user still use dial-up modems. * A full install of our flagship product is 8GB in size. I don't even want to download that with my 3G modem. My internet connection at home is capped at 500MB per month. Only this year are we switched to DVDs - before that we shipped our product on a CD set (+- 12 disks). That's why there are linux distributions on dvd. Graeme, a single file installer is a great idea, so I beg you to implement it. And when you achieved the goal that your installer has all the information about file destinations, icons, menu entries, registry, ..., there will be feature requests to create deb/rpm from that information. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] lazarus editor coloring
Hello list, I've noticed two things that are missing at Lazarus: 1. The ability to add/save new color style I'm making 2. Loading custom made coloring I always change the default coloring of Lazarus to extended the coloring, however I can't save it as a new coloring style. Moreover I've noticed that on a darker places, a light editor is harder to work, and on a light place, a darker editor is harder to work with, so if I could replace such colors depending of my needs (that's where the saving come handy) it will be much easier to work with the editor imho. Now the big question is, how do I add such feature to Lazarus ? What exactly does it require and what points do I need to know before doing such thing ? Thanks, Ido http://ik.homelinux.org/ -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Can't compile Lazarus from latest svn
On Thu, 21 Jan 2010 02:00:12 +0200 Žilvinas Ledas zilvinas.le...@dict.lt wrote: Žilvinas Ledas wrote: Mattias Gaertner wrote: On Thu, 21 Jan 2010 01:25:10 +0200 Žilvinas Ledas zilvinas.le...@dict.lt wrote: Hello all, I get error: Compiling E:\lazarus\packager\frames\compiler_buildvar_options.pas Compiling .\frames\compiler_conditionals_options.pas compiler_conditionals_options.pas(28,47) Fatal: Circular unit reference between compiler_conditionals_options and Compiler_BuildVar_Options Fatal: Compilation aborted while trying to compile Lazarus latest svn version (using yesterdays fpc version). Am I doing something wrong? Compile clean. For example via make clean all Mattias Tried that. It gives the same error... Ok, I found the problem. I had two files called Compiler_BuildVar_Options... Somehow older file got coppied to lazarus\packager\frames\ directory. Sorry for disturbance. It was moved form there. Maybe you had the file open while updating svn? Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] cross-distro (and OS) app installation - what would you like?
George Lober wrote: The few that caught my eye were very basic, and not workable with closed source commercial software. http://developer.berlios.de/projects/fixinst/ http://autopackage.org/ We looked at projects like AutoPackage (I really liked this one), ZeroInstall, etc... All nice, but unfortunately they first require a runtime to be installed *before* you can install *.package files. That's no good, because not a single mainstream distro comes standard with those runtime packages pre-installed. The Installer itself shouldn't have such requirements, it should just run. Besides the deployment issues, another thing that discourages me from writing software for Linux is the virtual non existence of anti-cracking software. I know what you mean. We flew 1200km to the biggest Security Confrence in South Africa and spoke to every single vendor there. Not one had anti-cracking security software for Linux. Windows sure, but not Linux. So we had to implemented that ourselves. We can now lease software, lock to hardware, xx-day evaluation, etc... Unfortunately that code is not open source. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/ -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] lazarus editor coloring
ik wrote: 1. The ability to add/save new color style I'm making 2. Loading custom made coloring I've had the same issue, and have about 15 different color scheme files available. By files I mean a copies of the .xml file Lazarus generates. Now the big question is, how do I add such feature to Lazarus ? What exactly does it require and what points do I need to know before doing A few months back I created a patch which removes the hard coded color scheme idea, and instead existing color schemes register themselves with a singleton class. The patch was applied, but I haven't had the time to continue the work on importing and exporting new color schemes. Things that need to be addressed: * For one, I think the color scheme information should go into a separate .xml file and not be part of the editoroptions.xml file. * I also think a runtime loading of color schemes is required. Lazarus comes standard with 5 or so, but when Lazarus starts up, it should also check a directory (eg: ~/.lazarus/colorschemes/) for any custom schemes and populate the scheme combobox with those too. * If previously you used a custom color scheme and one restarting that scheme is not available, it should fall back to one of the default color schemes include with lazarus (always available). Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/ -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] lazarus editor coloring
21.01.2010 16:20, ik wrote: I've noticed two things that are missing at Lazarus: 1. The ability to add/save new color style I'm making 2. Loading custom made coloring Now the big question is, how do I add such feature to Lazarus ? What exactly does it require and what points do I need to know before doing such thing ? Look at ide\editoroptions.pp DEFAULT_COLOR_SCHEME, TWILIGHT_COLOR_SCHEME, ... I suppose you need to implement load and save of default color schemes from some scheme configuration file. Best regards, Paul Ishenin. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] cross-distro (and OS) app installation - what would you like?
On Thu, Jan 21, 2010 at 11:22:22AM +0200, Graeme Geldenhuys wrote: George Lober wrote: [...] Besides the deployment issues, another thing that discourages me from writing software for Linux is the virtual non existence of anti-cracking software. I know what you mean. We flew 1200km to the biggest Security Confrence in South Africa and spoke to every single vendor there. Not one had anti-cracking security software for Linux. Windows sure, but not Linux. So we had to implemented that ourselves. We can now lease software, lock to hardware, xx-day evaluation, etc... Unfortunately that code is not open source. Hmm, I think codemeter has support for linux. They have bindings for Delphi (Windows) but i did not yet try to use the API with fpc Linux. The customer-tools are working fine with Linux. http://www.wibu.de/ regards, Stefan -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] lazarus editor coloring
ik wrote: 1. The ability to add/save new color style I'm making 2. Loading custom made coloring The patch I was talking about is in r20123, and the global color scheme factor is accessed as: function ColorSchemeFactory: TColorSchemeFactory; Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/ -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] cross-distro (and OS) app installation - what would you like?
On Thu, 21 Jan 2010, Graeme Geldenhuys wrote: George Lober wrote: The few that caught my eye were very basic, and not workable with closed source commercial software. http://developer.berlios.de/projects/fixinst/ http://autopackage.org/ We looked at projects like AutoPackage (I really liked this one), ZeroInstall, etc... All nice, but unfortunately they first require a runtime to be installed *before* you can install *.package files. That's no good, because not a single mainstream distro comes standard with those runtime packages pre-installed. The Installer itself shouldn't have such requirements, it should just run. Besides the deployment issues, another thing that discourages me from writing software for Linux is the virtual non existence of anti-cracking software. I know what you mean. We flew 1200km to the biggest Security Confrence in South Africa and spoke to every single vendor there. Not one had anti-cracking security software for Linux. Windows sure, but not Linux. So we had to implemented that ourselves. We can now lease software, lock to hardware, xx-day evaluation, etc... Unfortunately that code is not open source. ? OnGuard from turbopower does this. It is Object Pascal, so I don't see what the problem with that could be ? Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] cross-distro (and OS) app installation - what would you like?
Michael Van Canneyt wrote: ? OnGuard from turbopower does this. It is Object Pascal, so I don't see what the problem with that could be ? That is a sore point. We only found that after we did our implementation. :-( Is the FPC+Lazarus port usable? Project status on wiki says beta, but so does Lazarus IDE. ;-) Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/ -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] cross-distro (and OS) app installation - what would you like?
On Thu, Jan 21, 2010 at 09:25:03AM +0200, Graeme Geldenhuys wrote: zeljko wrote: Just because WMaker is not freedesktop compliant ? ;) And? And judging by the progress in recent years, a dead product. We mostly have it on servers yes. But I don't see why the installer wouldn't be used to deploy a serverside product, with some GUI component as config app. Still, I wouldn't only support kde/gnome. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] cross-distro (and OS) app installation - what would you like?
On Thu, Jan 21, 2010 at 01:24:04AM +0200, Graeme Geldenhuys wrote: (it might be wise to check out in how far these named programs are shared linked) True, those mentioned (and ones like ATI and Nvida drivers) tend to be more on the commercial side of things. But then again, our company products are commercial products. :) The point that I was trying to make, is that they are cross-distro exactly because of that (being mostly statically linked). That's the crucial difference between Linux and windows in that regard. * The setup must be configurable at runtime. We have a single setup.xml file that controls the setup. (Doesn't this violate single file?) No, not from the end-users point of view. After creating the setup, one further step is taken using the tool 'makeself'. The setup files (setup binaries, data, setup.xml etc) are packaged with makeself into a single self-extracting file. This is the file that the end-user will download and run. Makeself also has the feature that once unpacked, it can run a command - in our case it will fire off the executable of the real unpacked setup files. Once the command makeself executed is done, it even cleans up after itself by removing the unpacked temporary files. Clear. But if it is internal and not user adaptable, all communication must happen (be possible) via the cmdline. Do you plan to support windowmaker? A lot of packages do this wrong under Windowmaker. If Window Maker supports the LSB or freedesktop.org standards it should work. A quick search on Wikipedia says the last stable release was in 2005, so it might not support the latest desktop standards. I'll make a note and double check for you. Make it at least pluggable, so that if you need to support some odd ball desktop, you can at least run a script or binary to install the link. It is less important that it will be perfect, but more a way to avoid that that one user that has a deviant opinion or desktop makes your life hell. (and you can't whine about freedesktop.org to the customer then, it doesn't matter to him) -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] cross-distro (and OS) app installation - what would you like?
Marco van de Voort wrote: The point that I was trying to make, is that they are cross-distro exactly because of that (being mostly statically linked). OK. In our case, all our products and required features (encryption, xml support, etc) are all compiled into the executable. So we simply need a bare bones GUI to run in. Clear. But if it is internal and not user adaptable, all communication must happen (be possible) via the cmdline. It is, yes. makeself can accept parameters to itself or pass them on to the program it's going to execute. Alternatively, you can package the setup in such a way that it doesn't need user interaction. Make it at least pluggable, so that if you need to support some odd ball desktop, you can at least run a script or binary to install the link. Each option (feature to be installed) can support a custom script. We also have global pre and post install and uninstall scripts. So you can hook into any of those and do whatever task you want. We know how hard it is to please everybody, so we thought long and hard on making it as flexible as possible. BTW: If your setup is limited to one specific platform, those scripts could be replaced with binary executables too. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/ -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] cross-distro (and OS) app installation - what would you like?
Marco van de Voort wrote: And judging by the progress in recent years, a dead product. We mostly have it on servers yes. But I don't see why the installer wouldn't be used to deploy a serverside product, with some GUI component as config app. Still, I wouldn't only support kde/gnome. No need to explain, I maintain Linux servers too. If I need to run some GUI app, I tend to setup a minimalist window manager too. These days I am quite fond of JWM (Joe's Window Manager).The look and feel resembles that of Windows (9x,2000) Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/ -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Error: illegal qualifier [ found
Kjow schrieb: 2010/1/20 Mattias Gaertner nc-gaert...@netcologne.de: Can you give a more complete example? Mattias e.g. If I add to a form a listview or a memo or a combobox and in the source code I put this: ListBox1.items[0]. or Memo1.Lines[0]. or combobox1.items[0]. If I press CRTL+Space I got this error: \lcl\stdctrls.pp(909,19) Error: identifier expected, but found IMO code completion should be better in ignoring whitespace. I had similar problems already, where a space out of thin air (source formatter?) prevented usable typeahead completion. The concrete error may depend on IDE options, in detail formatting options. With source formatting it would be nice to have: 1) disable any formating, using a single checkbox (in the menu?) 2) provide kind of settings information dump, for attachment to bug reports. [1] would allow to determine whether formatting is involved at all. Since I don't like auto-formatting, I'd use that checkbox to disable automatic formatting most of the time. [2] should allow to mimic the IDE settings, which may be required to reproduce the error. It should be easy to restore the original state of the IDE settings, or to switch between both settings (hers/mine). DoDi -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] cross-distro (and OS) app installation - what would you like?
Graeme Geldenhuys schrieb: On 20/01/2010, Jonathan wrote: The is no frame work under Windows for the menu, just files thats why you have silly company's listing there program under there name. I haven't looked at that code in a while, but our old Delphi programs created there own icons. Just a note, how you can improve your English: To find out whether to use there or their, try to replace it by my and here. Depending on what fits better, substitute my -- their here -- there HTH DoDi -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] PropEdits.TGetStringProc duplicated Classes. TGetStrProc
waldo kitty schrieb: ok... thanks for that... i was unaware that type string was an alias for ansistring... i had thought that string was the same as the old borland string definition (ie: array of chars with the [0] element containing the string length) ;) In newer Delphi versions (2009+) string is UnicodeString, that's why using AnsiString will reduce possible confusion of people, who use Delphi and Lazarus concurrently. string[n] is ShortString, even in the new Delphi versions. DoDi -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] PropEdits.TGetStringProc duplicated Classes. TGetStrProc
On Thu, 21 Jan 2010 10:00:27 +0100 Hans-Peter Diettrich drdiettri...@aol.com wrote: waldo kitty schrieb: ok... thanks for that... i was unaware that type string was an alias for ansistring... i had thought that string was the same as the old borland string definition (ie: array of chars with the [0] element containing the string length) ;) In newer Delphi versions (2009+) string is UnicodeString, that's why using AnsiString will reduce possible confusion of people, who use Delphi and Lazarus concurrently. string[n] is ShortString, even in the new Delphi versions. string is ansistring in lazarus sources since 10 years. I guess, most lazarus users are used to it. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] cross-distro (and OS) app installation - what would you like?
Hans-Peter Diettrich wrote: To find out whether to use there or their, try to replace it by my Excellent, thanks. Afrikaans is so much simpler than English. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/ -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] cross-distro (and OS) app installation - what would you like?
Graeme Geldenhuys wrote: George Lober wrote: The few that caught my eye were very basic, and not workable with closed source commercial software. http://developer.berlios.de/projects/fixinst/ http://autopackage.org/ We looked at projects like AutoPackage (I really liked this one), ZeroInstall, etc... All nice, but unfortunately they first require a runtime to be installed *before* you can install *.package files. That's no good, because not a single mainstream distro comes standard with those runtime packages pre-installed. The Installer itself shouldn't have such requirements, it should just run. Besides the deployment issues, another thing that discourages me from writing software for Linux is the virtual non existence of anti-cracking software. I know what you mean. We flew 1200km to the biggest Security Confrence in South Africa and spoke to every single vendor there. Not one had anti-cracking security software for Linux. Windows sure, but not Linux. So we had to implemented that ourselves. We can now lease software, lock to hardware, xx-day evaluation, etc... Unfortunately that code is not open source. The one I know about is called FlexNet, by ROVI (previously MacroVision). It does support multiple platforms including Linux: http://www.rovicorp.com/company/11082.htm http://www.flexerasoftware.com/products/flexnet-publisher/features.htm but is a big league mega buck solution. Four years back when I inquired about cost, it was several thousands of dollars. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] cross-distro (and OS) app installati on - what would you like?
On Thursday 21 January 2010 11:08, Marco van de Voort wrote: On Thu, Jan 21, 2010 at 09:25:03AM +0200, Graeme Geldenhuys wrote: zeljko wrote: Just because WMaker is not freedesktop compliant ? ;) And? And no default way (freedesktop way) to setup desktop icons, menu icons etc etc etc ... -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] cross-distro (and OS) app installation - what would?you like?
On Thu, Jan 21, 2010 at 01:30:31PM +0100, zeljko wrote: On Thursday 21 January 2010 11:08, Marco van de Voort wrote: On Thu, Jan 21, 2010 at 09:25:03AM +0200, Graeme Geldenhuys wrote: zeljko wrote: Just because WMaker is not freedesktop compliant ? ;) And? And no default way (freedesktop way) to setup desktop icons, menu icons etc etc etc ... One could say that there is a perfect (GNUStep) way, which afaik works for multiple STEP windowmanagers. Note that it could be that if windowmaker is not on the freedesktop list, GNUstep is. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Application.QueueAsyncCall()
On Thu, Jan 21, 2010 at 9:17 AM, Brad Campbell b...@wasp.net.au wrote: Flávio Etrusco wrote: On Wed, Jan 20, 2010 at 5:54 AM, Brad Campbell b...@wasp.net.au wrote: Is QueueAsyncCall() threadsafe? In Delphi the queued method is run on the (context of) the main/GUI thread. Which is precisely what I want. The issue is not the context of the queued method, but the method used to poke the event onto the application event queue being threadsafe. I'm almost thinking of using a unix socket and using the socket in AddEventHandler() to watch for a signal in the main loop. Brad Yes, the procedure itself is (meant to be) threadsafe. -Flávio -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] DBGrid painting confusion
Hi, Inside TCustomDBGrid.DefaultDrawColumnCell, the code looks as follows: procedure TCustomDBGrid.DefaultDrawColumnCell(const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState); var S: string; F: TField; begin F := Column.Field; DataCol := GridColumnFromColumnIndex(DataCol); if DataCol=FirstGridColumn then case ColumnEditorStyle(DataCol, F) of cbsCheckBoxColumn: DrawCheckBoxBitmaps(DataCol, Rect, F); else begin if Fnil then begin if F.dataType ftBlob then S := F.DisplayText else S := '(blob)'; end else S := ''; DrawCellText(0, DataCol, Rect, State, S); end; end; end; My confusion is the call to DrawCellText(). The parameter list for DrawCellText() is shown below. So why is the method above passing the DataCol variable in the aRow parameter? Shouldn't the DataCol be passed as the aCol parameter instead? Also, why is aCol always 0 in the call to DrawCellText()? procedure DrawCellText(aCol,aRow: Integer; aRect: TRect; aState: TGridDrawState; aText: String); virtual; -- Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Application.QueueAsyncCall()
2010/1/21 Flávio Etrusco flavio.etru...@gmail.com: On Thu, Jan 21, 2010 at 9:17 AM, Brad Campbell b...@wasp.net.au wrote: Flávio Etrusco wrote: On Wed, Jan 20, 2010 at 5:54 AM, Brad Campbell b...@wasp.net.au wrote: Is QueueAsyncCall() threadsafe? In Delphi the queued method is run on the (context of) the main/GUI thread. Which is precisely what I want. The issue is not the context of the queued method, but the method used to poke the event onto the application event queue being threadsafe. I'm almost thinking of using a unix socket and using the socket in AddEventHandler() to watch for a signal in the main loop. Brad Yes, the procedure itself is (meant to be) threadsafe. -Flávio Oops, sorry! Scrap what I said :-$ I was thinking about Delphi TThread.QueueAsyncsomething... Lazarus' Application.TAsyncCallQueues isn't threadsafe AFAICS from the code. -Flávio -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Mouse cursor support under Linux (GTK1/GTK2)
Hi, Is mouse cursor support also a known and will not fix issue? Just before I start a long running process I set Screen.Cursor := crHourGlass and then start the process. The mouse cursor simply stays the default cursor, it doesn't change. I even installed GTK1 and compiled my app for both GTK1 and GTK2 and in both case the mouse cursor NEVER changes! :-( I'm running Lazarus 0.9.29 (updated from SVN on 2009-12-29) with FPC 2.2.5 -- Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Retrieve VersionInfo at runtime
Is there a way to retrieve the version info that is stored in the project file at runtime? Luiz -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Retrieve VersionInfo at runtime
Luiz Americo Pereira Camara escreveu: Is there a way to retrieve the version info that is stored in the project file at runtime? If possible i also would like to get the compilation date Luiz -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Mouse cursor support under Linux (GTK1/GTK2)
22.01.2010 4:16, Graeme Geldenhuys wrote: Is mouse cursor support also a known and will not fix issue? Just before I start a long running process I set Screen.Cursor := crHourGlass and then start the process. The mouse cursor simply stays the default cursor, it doesn't change. No it must work. Maybe you are doing something wrong (please look at cursors example). If no then please create a bug report. Best regards, Paul Ishenin. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Retrieve VersionInfo at runtime
22.01.2010 4:41, Luiz Americo Pereira Camara wrote: Is there a way to retrieve the version info that is stored in the project file at runtime? A way - yes, but it is not easy. I thought to create some simple access methods but no time for this currently. Best regards, Paul Ishenin. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Mouse cursor support under Linux (GTK1/GTK2)
On 22/01/2010, Paul Ishenin webpi...@mail.ru wrote: No it must work. Maybe you are doing something wrong (please look at cursors example). If no then please create a bug report. OK, I found my problem. It was code I ported from Delphi 7, and the usage of the cursor is slightly different for Lazarus. I used a stack to push pop cursors onto while opening nested modal dialogs and then restore them as the dialogs close. It was a test app of mine. But all is working again. Apologies for the false alarm. -- Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Application.QueueAsyncCall()
Flávio Etrusco wrote: Oops, sorry! Scrap what I said :-$ I was thinking about Delphi TThread.QueueAsyncsomething... Lazarus' Application.TAsyncCallQueues isn't threadsafe AFAICS from the code. No, it would appear not. Nevermind, it turns out it's only called at the start of the idle handler in any case, so if the application is idle, it's no better than me polling with a timer. Surely there is a cross-platform, threadsafe way for me to alert the main thread there is something I want it to respond to *now*. Oh well, I'll keep looking. Regards, Brad -- Dolphins are so intelligent that within a few weeks they can train Americans to stand at the edge of the pool and throw them fish. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Application.QueueAsyncCall()
Brad Campbell wrote: Is QueueAsyncCall() threadsafe? Let's say I have a communications child thread and I want to trigger a call back in the main GUI thread. Traditionally I'd do something ugly like have a timer polling a variable used as a flag, or polling a RtlEvent on a short timeout, but this seems like a much nicer solution. After reading the source for TThread.Synchronize() I see it already implements the round thing with spokes and a hub that I've been so busily trying to re-implement. A total lack of understanding on my part. Thanks for everyones help. Regards, Brad -- Dolphins are so intelligent that within a few weeks they can train Americans to stand at the edge of the pool and throw them fish. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Retrieve VersionInfo at runtime
Luiz Americo Pereira Camara wrote: Is there a way to retrieve the version info that is stored in the project file at runtime? Instantiate a TProcess class and execute 'app -v' (obviously your app needs that command line param support) and read the output. This is the safest way and most cross-platform way I could find. I simply ignore the version information tab in the Project Settings dialog, because it only works for one out of all the supported platforms (windows). You can even have a command line parameter that outputs similar version information as that tab, but in the format key=value, so when you read that output directly into a TStringList, it is even easier to parse and use. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/ -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Retrieve VersionInfo at runtime
Luiz Americo Pereira Camara wrote: If possible i also would like to get the compilation date const cCompileDate = {$I %date%}; cCompileTime = {$I %time%}; I couldn't find a way of formatting the date and time to my locale (under Linux, not sure for other platforms). It seems to be hard-coded, so you will have to parse and format it manually. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/ -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] DBGrid painting confusion
Jesus Reyes wrote: I understand the confusion, it was a mix of typo and incomplete implementation, fixed in r 23526. Thanks, it make a lot more sense now. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/ -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] DBGrid highlighting certain cells
Hi, What is the recommended way of highlighting (by changing cell background color) certain cells based on there display value? In Delphi I did the following: * DefaultDrawing = False * OnDrawDataCell I implemented the following. Check for criteria, then set Brush.Color Then call DefaultDrawDataCell This saves me the trouble from having to manually draw everything like the background color, border, text etc... Unfortunately this easy method is not possible with Lazarus, because DefaultDrawColumnCell doesn't paint the background (only text), it is done somewhere else (not sure where). Is this an oversight, or by design? If by design, what is the recommended way of doing this? Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/ -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Retrieve VersionInfo at runtime
Graeme Geldenhuys wrote: I simply ignore the version information tab in the Project Settings dialog, because it only works for one out of all the supported platforms (windows). I've been thinking about looking at integrating it in somewhere as a resource. I currently integrate my Changelog and Release notes into the binary as compressed resources using lazres. I just decompress them into streams as required and use loadfromstream() in memo components to display them. If I can figure out how to integrate simple resources using the new fpc resource stuff, I'll do it that way. Regards, Brad -- Dolphins are so intelligent that within a few weeks they can train Americans to stand at the edge of the pool and throw them fish. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Retrieve VersionInfo at runtime
22.01.2010 13:56, Brad Campbell wrote: Graeme Geldenhuys wrote: I simply ignore the version information tab in the Project Settings dialog, because it only works for one out of all the supported platforms (windows). I've been thinking about looking at integrating it in somewhere as a resource. I currently integrate my Changelog and Release notes into the binary as compressed resources using lazres. I just decompress them into streams as required and use loadfromstream() in memo components to display them. If I can figure out how to integrate simple resources using the new fpc resource stuff, I'll do it that way. Version info from the project version info tab is usable on all platform and there is a cross-platform way to retrieve it but it requires deep knowledge of windows resources. I can create a class which will retrieve all the written info from the version resources. There are no big problems here. The only question I have whether it is a part of LCL or more belongs to RTL/FCL? I think that the proper place for such a class is somewhere inside fcl-res package but the goal of that package differ a bit. Best regards, Paul Ishenin. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] FTP Server component?
Hi, I looked at lnet and TurboPower IPro components and only saw FTP Client components. Anybody know where I could get a FTP Server component? Alternatively, a free or open-source FTP Server application that can run on Windows XP or Windows Server 2003 would also be great. Linux already has decent FTP servers available. Why? We transfer a lot of files (huge amounts of data) over our internal network. We tested performance between Win - Win and Win - Linux systems using Samba or MS Network Neighbourhood. We then tested Win - Linux using FTP and the transfer speeds where a LOT better! This speed increase makes sense because FTP is a specific file transfer protocol, where SMB is mixed bag: file sharing, printer sharing and lots of other communications we don't need. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/ -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] DBGrid highlighting certain cells
--- El vie 22-ene-10, Graeme Geldenhuys graemeg.li...@gmail.com escribió: De:: Graeme Geldenhuys graemeg.li...@gmail.com Asunto: [Lazarus] DBGrid highlighting certain cells A: Lazarus mailing list lazarus@lists.lazarus.freepascal.org Fecha: viernes 22 de enero de 2010, 0:47 Hi, What is the recommended way of highlighting (by changing cell background color) certain cells based on there display value? The recommended way is using OnPrepareCanvas DbGrid event. In Delphi I did the following: * DefaultDrawing = False * OnDrawDataCell I implemented the following. Check for criteria, then set Brush.Color Then call DefaultDrawDataCell This saves me the trouble from having to manually draw everything like the background color, border, text etc... Using OnPrepareCanvas you don't have to draw anything, you get the column:tcolumn which is being painted as an argument and from there you get the field and can take decisions based on fields value, then you change dbgrid's canvas properties, for cell background you will have to adjust grid.canvas.brush.color, font changes can be made on grid.canvas.font, alignment, etc. for borders one needs custom drawing and OnDrawColumnCell is needed, OnPrepareCanvas do not help here. Unfortunately this easy method is not possible with Lazarus, because DefaultDrawColumnCell doesn't paint the background (only text), it is done somewhere else (not sure where). Is this an oversight, or by design? I think until now nobody noted the problem, probably this feature is not used too much. But IIRC, the background was supposed to be painted in OnDrawColumnCell and then you call DefaultDrawColumnCell, I might have mis understood how this works, I need a good test case. If by design, what is the recommended way of doing this? Although with OnPrepareCanvas we cover most of cases where this feature is needed I would like to make it Delphi compatible, if possible, please submit a bug report. Regards, - Graeme - Jesus Reyes A. Encuentra las mejores recetas en Yahoo! Cocina. http://mx.mujer.yahoo.com/cocina/ -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Retrieve VersionInfo at runtime
Paul Ishenin wrote: Version info from the project version info tab is usable on all platform and there is a cross-platform way to retrieve it but it requires deep knowledge of windows resources. This makes no sense. :-) It's cross-platform, but requires deep knowledge of MS Windows? How is MS Windows knowledge cross-platform? more belongs to RTL/FCL? I think that the proper place for such a class is somewhere inside fcl-res package but the goal of that package differ I've seen comments here and there about FCL-res package, but haven't looked at it in detail. But my first thought would also be that such version info retrieval class be in FCL and not LCL. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/ -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] FTP Server component?
I don't know of a server component, but a free windows FTP server is filezilla (http://filezilla-project.org/) On Fri, Jan 22, 2010 at 2:33 AM, Graeme Geldenhuys graemeg.li...@gmail.comwrote: Hi, I looked at lnet and TurboPower IPro components and only saw FTP Client components. Anybody know where I could get a FTP Server component? Alternatively, a free or open-source FTP Server application that can run on Windows XP or Windows Server 2003 would also be great. Linux already has decent FTP servers available. Why? We transfer a lot of files (huge amounts of data) over our internal network. We tested performance between Win - Win and Win - Linux systems using Samba or MS Network Neighbourhood. We then tested Win - Linux using FTP and the transfer speeds where a LOT better! This speed increase makes sense because FTP is a specific file transfer protocol, where SMB is mixed bag: file sharing, printer sharing and lots of other communications we don't need. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/ -- ___ 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] Retrieve VersionInfo at runtime
22.01.2010 14:38, Graeme Geldenhuys пишет: Paul Ishenin wrote: Version info from the project version info tab is usable on all platform and there is a cross-platform way to retrieve it but it requires deep knowledge of windows resources. This makes no sense. :-) It's cross-platform, but requires deep knowledge of MS Windows? How is MS Windows knowledge cross-platform? Yes, because resource support in fpc made in a 'windows-like'/'delphi-like'. Nothing bad in this but work with resources requires knowledge of windows structures which are used to store different resource info into executable. And version info resource is not the easiest structure. Best regards, Paul Ishenin. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus