Re: [Lazarus] Is there aTDBLabel?
It works. But still I wonder, is there a another way? I've tried TDBText but that shows th field value, not the DisplayLabel. There is no standard control for it. But it should in fact be easy to add to the LCL. I have used DB-aware version of TLabeledEdit. It is often the case that you use Label + Edit together. May be that having it in LCL will be also useful. -Laco. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] clean installation
On Wed, 9 Mar 2016 16:21:06 -0500 Richard Medinawrote: > I am having problems to install the last version of Lazarus. > Please anyone can help me? > I am using linux mint (ubuntu). > I already donwloaded the last version Lazarus 1.6 with fpc3.0.0. and fpc > source 3.0.0. What error message do you get? Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] clean installation
I am having problems to install the last version of Lazarus. Please anyone can help me? I am using linux mint (ubuntu). I already donwloaded the last version Lazarus 1.6 with fpc3.0.0. and fpc source 3.0.0. Thank you -- Richard.MC -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] PDF generator
On Wed, 9 Mar 2016, leledumbo wrote: I have committed a PDF generator to FPC Subversion: fcl-pdf The package must be excluded from build for msdos target because its dependencies are not available for msdos, otherwise full build will fail. There are already embedded and win16 in the exclude list. Done, rev. 33212. Thanks for testing. Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Is there aTDBLabel?
Thanks Michael, I will do the same. And the use of colors is very nice. mvg Frans van Leeuwen M 06-51695390 Op 09-03-2016 om 20:59 schreef Michael Van Canneyt: On Wed, 9 Mar 2016, Frans wrote: Hi I use Lazarus 1.6 on Windows 7. I've used lazdatadesktop to change the Displaylabel of the DB fields. In a DBGrid that new names popup as the column names. But in a form with TDBEdit fields I can't use a TDBLabel that automatically takes the name from the associated Control as the caption. Instead, I placed TLabel components and made the following method: procedure TMyForm.FormShow(Sender: TObject); var l: TLabel; begin for TComponent(l) in Self do begin if (l is TLabel) and (l.FocusControl is TDBEdit) then l.Caption := TDBEdit(l.FocusControl).Field.DisplayLabel; if (l is TLabel) and (l.FocusControl is TDBLookupComboBox) then l.Caption := TDBLookupComboBox(l.FocusControl).Field.DisplayLabel; end; end; It works. But still I wonder, is there a another way? I've tried TDBText but that shows th field value, not the DisplayLabel. There is no standard control for it. But it should in fact be easy to add to the LCL. I have a very large application in which I do the same, but I had to develop my own TLabel subclass for this. (It also switches color when the field is required etc.) Michael. -- ___ 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 there aTDBLabel?
On Wed, 9 Mar 2016, Frans wrote: Hi I use Lazarus 1.6 on Windows 7. I've used lazdatadesktop to change the Displaylabel of the DB fields. In a DBGrid that new names popup as the column names. But in a form with TDBEdit fields I can't use a TDBLabel that automatically takes the name from the associated Control as the caption. Instead, I placed TLabel components and made the following method: procedure TMyForm.FormShow(Sender: TObject); var l: TLabel; begin for TComponent(l) in Self do begin if (l is TLabel) and (l.FocusControl is TDBEdit) then l.Caption := TDBEdit(l.FocusControl).Field.DisplayLabel; if (l is TLabel) and (l.FocusControl is TDBLookupComboBox) then l.Caption := TDBLookupComboBox(l.FocusControl).Field.DisplayLabel; end; end; It works. But still I wonder, is there a another way? I've tried TDBText but that shows th field value, not the DisplayLabel. There is no standard control for it. But it should in fact be easy to add to the LCL. I have a very large application in which I do the same, but I had to develop my own TLabel subclass for this. (It also switches color when the field is required etc.) Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Is there aTDBLabel?
Hi I use Lazarus 1.6 on Windows 7. I've used lazdatadesktop to change the Displaylabel of the DB fields. In a DBGrid that new names popup as the column names. But in a form with TDBEdit fields I can't use a TDBLabel that automatically takes the name from the associated Control as the caption. Instead, I placed TLabel components and made the following method: procedure TMyForm.FormShow(Sender: TObject); var l: TLabel; begin for TComponent(l) in Self do begin if (l is TLabel) and (l.FocusControl is TDBEdit) then l.Caption := TDBEdit(l.FocusControl).Field.DisplayLabel; if (l is TLabel) and (l.FocusControl is TDBLookupComboBox) then l.Caption := TDBLookupComboBox(l.FocusControl).Field.DisplayLabel; end; end; It works. But still I wonder, is there a another way? I've tried TDBText but that shows th field value, not the DisplayLabel. -- mvg Frans van Leeuwen M 06-51695390 -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] PWM on raspberry pi
On Wed, 9 Mar 2016 09:57:16 +0100, Koenraad Lelongwrote: >>REG_GPIO = {$IFDEF RPi2} $3F000 {$ELSE} $2 >> {$ENDIF};//bcm2835/bcm2836 gpio register 0x2000 . new fpMap uses >Well, that's what I did, although without the conditionals. >Did you try PWM, e.g. with the demo-program ? Does it work ? No, I just needed to use In-Out to control relays and check digital levels. -- Bo Berglund Developer in Sweden -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] lazarus asking for every symlink
On Di, 2016-03-08 at 18:45 +0100, Marc Santhoff wrote: > Hi, > > the last update to Lazarus 1.4.2 from 2016-02-06 brought some extra fun: > > For every opened file represented by a symlink Lazarus asks if it should > follow the link. This is very annoying, there are at least 4 linked > files open in my work session prmanently, so I have to klick 4 times > extra. > > Is thre an option to switch that behaviour of? I have found nothing in > the options dialog. > > Running on: > FreeBSD 9.1-STABLE amd64 I've tried 1.4.4, because I'm bound to fpc 2.6.4 for a while, same behaviour. Any hints? TIA, Marc -- Marc Santhoff-- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] PDF generator
> I have committed a PDF generator to FPC Subversion: fcl-pdf The package must be excluded from build for msdos target because its dependencies are not available for msdos, otherwise full build will fail. There are already embedded and win16 in the exclude list. -- View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-PDF-generator-tp4047578p4047658.html Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Windows API calls and german Umlauts
On Wed, 9 Mar 2016 13:04:50 +0100 "John Landmesser"wrote: > Hi, > > if i call a windows API function for special folder, like: > > uses > ... > shlobj; > > var > AppDataPath: Array[0..MaxPathLen] of Char; > begin > SHGetSpecialFolderPath(0,AppDataPath,CSIDL_STARTUP,false); > end; > > I get on a german localized Windows XP a path containing > "Startmenü", but the "ü" is "?" in the resulting string. > > Howto convert the chars in AppDataPath to get the "Umlauts" correct? According to msdn SHGetSpecialFolderPath is not supported by Microsoft. Instead, use ShGetFolderPath. Unit LazFileUtils has already a more sophisticated implementation for UTF8. I added function SHGetFolderPathUTF8(ID : Integer) : String; Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Windows API calls and german Umlauts
On Wed, 9 Mar 2016, John Landmesser wrote: Hi, if i call a windows API function for special folder, like: uses ... shlobj; var AppDataPath: Array[0..MaxPathLen] of Char; begin SHGetSpecialFolderPath(0,AppDataPath,CSIDL_STARTUP,false); end; I get on a german localized Windows XP a path containing "\Startmenü\", but the "ü" is "?" in the resulting string. Howto convert the chars in AppDataPath to get the "Umlauts" correct? Use the W variant of the call, and user widechar. var AppDataPath: Array[0..MaxPathLen] of WideChar; begin SHGetSpecialFolderPathW(0,AppDataPath,CSIDL_STARTUP,false); Then convert to UTF8 using UTF8Encode() if you want to display it in a LCL application. Michael.-- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Windows API calls and german Umlauts
Hi, if i call a windows API function for special folder, like: uses ... shlobj; var AppDataPath: Array[0..MaxPathLen] of Char; begin SHGetSpecialFolderPath(0,AppDataPath,CSIDL_STARTUP,false); end; I get on a german localized Windows XP a path containing "\Startmenü\", but the "ü" is "?" in the resulting string. Howto convert the chars in AppDataPath to get the "Umlauts" correct? Thanks!! -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus 1.6 can break old programs?
On 3/8/16, Chavoux Luytwrote: > When trying to debug, I get this exception on calling > OpenDlg.Execute() : "Project birds raised exception class 'External: > SIGFPE'. At address 709DA57F" See: http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips Try - go to the debugger options and set the field "DisableLoadSymbolsForLibraries" to "True" If that does not help, try some of the other suggestions. Bart -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] PWM on raspberry pi
Op 08-03-16 om 19:50 schreef Bo Berglund: In PiGpio I added the following (roundabout line #20: {$DEFINE RPi2} const REG_GPIO = {$IFDEF RPi2} $3F000 {$ELSE} $2 {$ENDIF};//bcm2835/bcm2836 gpio register 0x2000 . new fpMap uses page offset, one page is 4096bytes then later down in the file (around line #150): function TIoDriver.MapIo: boolean; begin Result := True; {$IFDEF RPi2} fd := fpopen('/dev/gpiomem', O_RdWr or O_Sync); // Open the master /dev/memory device {$ELSE} fd := fpopen('/dev/mem', O_RdWr or O_Sync); // Open the master /dev/memory device {$ENDIF} I do not know for a fact tha the second change is because of the RPi2 hardware, it was probably put there in order to make my program run as a normal user rather than su. Well, that's what I did, although without the conditionals. Did you try PWM, e.g. with the demo-program ? Does it work ? Koenraad. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus