[lazarus] Raize programmer font (and now for Linux too)
Hi, In all the years I programmed with Delphi, I used a programmer font called Raize. It is simply brilliant. It makes a clear distinction between 0, O, o, i, I, l, etc.. and Monospace obviously. Above all, it looks good (much better than Courier). For Windows users, you can download it for Free from the following location. http://www.raize.com/DevTools/Tools/RzFont.asp Unfortunately the FON file was in a strange non-standard format (some compiled windows DLL) so it wasn't possible to convert to a Linux PCF font format. I did email the company that created the font. They said I can convert it if I want, they don't mind. Unfortunately they weren't going to help me. No surprise there! :) In the end, I decided to do it the hard way and manually design the Raize font for Linux using FontForge. I have recreated the 11 point font (about 13 pixels in size on a 96dpi screen setting). I created the Normal and Bold characters. I don't use Italics - instead I use syntax highlighting which works much better. Attached is the Raize font for Linux. I also included a screenshot of sample code to show how the font looks. Later, I'll recreate the 12 and 14 point font for higher resolution displays. For those that don't know (or can't remember) how to install fonts under Linux: 1) Unpack the archive to /usr/local/share/fonts/bitmap 2) If other fonts already exist in the above path, then run the following: sudo mkfontdir /usr/local/share/fonts/bitmap 3) Add the following FontPath line to the Files section if it doesn't exist in your /etc/X11/xorg.conf file: FontPath /usr/local/share/fonts/bitmap 4) Restart X To view the font you can use Lazarus of xfontsel: Normal: -fontforge-raize-normal-*-*-*-*-*-*-*-*-*-*-* Bold: -fontforge-raize-bold-*-*-*-*-*-*-*-*-*-*-* Settings for use in Lazarus: Editor font: -fontforge-raize-normal-r-normal-*-*-*-*-*-*-*-iso8859-1 Editor font height: 13 (for some reason it defaults to 10) Enjoy! Regards, - Graeme - attachment: editor_font_raize.png raize_font_linux-1.0.tar.gz Description: GNU Zip compressed data
[lazarus] Lazarus on Windows + Qt or GTK
What about using lazarus IDE along LCL compiled on windows with different widgets other than the default Win32? (ie. QT or GTK?) Is this possible? Could it be unwise? just asking an advice before trying... tiziano _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Form designer code inside .pas unit
Hi, What are the pros and cons for letting the form designer add code inside the .pas unit instead of a separate .lfm file? For example: Lazarus and Delphi uses external files (.lfm and .dfm) to save information about forms designed using the form designer. Visual Studio and CodeGear's C# IDE's use the source code unit directly instead of a external unit. They embed the form/component creation code inside a private method called from the constructor. The code in that private method is also wrapped in C# Region so that it is hidden by default with code folding. So again, what is the pros and cons between the two design choices when using the Object Pascal language? Regards, - Graeme - _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Code Folding regions in Lazarus
Hi, Does Lazarus support some sort of code folding 'region' keyword like the Visual Studio IDE does? I know Lazarus automatically handle begin..end etc. But can the user add there own code folding regions around their code. Here is an example of regions used in the Visual Studio IDE for C# code #Region Windows Form Designer generated code ... System.Diagnostics.DebuggerStepThrough() _ Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container ... Me.ImageList1 = _ New System.Windows.Forms.ImageList(Me.components) ... #End Region Regards, - Graeme - _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Form designer code inside .pas unit
On Mon, 23 Jul 2007, Graeme Geldenhuys wrote: Hi, What are the pros and cons for letting the form designer add code inside the .pas unit instead of a separate .lfm file? The .lfm file is not code. It's a resource, which you can replace at runtime. Michael. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] GTK2 for arm-linux
Koenraad Lelong wrote: Christian Iversen schreef: What is your arm-board? It doesn't sound like the machine that runs your X-server? If you use a unix machine as a workstation, then try this line: DISPLAY=:0 xhost + (that just runs xhost + with the additional environment of DISPLAY=:0 so that we are sure it is set) This problem is not at all related to your program - it's a generic X problem. Try to get something like xterm or xclock running on the arm board, and you will see the same problem unless you fix the underlying problem. (Which could indeed be a missing $DISPLAY environment var, as pointed out by Tony Maro) Christian, Sorry about the missing information, but my arm-board is a PC104 computer-board with a PXA255 chip (Arcom Viper if you're interested). It has a color LCD of 320x240 pixels. My previous application in FPC with handwritten GTK2 code does run fine on that board, displaying on the LCD. The GUI design was made with Glade and translated to FPC. Now I'm trying to run a minimal Lazarus GTK2 application (a form with a button) on the same board, with the problem I reported. So that arm-board is the machine that runs my X-server. I'm sorry, I don't know exactly what the problem is. I think it's quite strange that some programs will contact the X-server, and others not. Are you 100% sure that you have started the programs with the same $DISPLAY environment var? If that's not the problem, I'm not really sure what is. -- Med venlig hilsen Christian Iversen _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Form designer code inside .pas unit
On 23/07/07, Michael Van Canneyt [EMAIL PROTECTED] wrote: The .lfm file is not code. It's a resource, which you can replace at runtime. OK, I understand the resource part. It's components that have been streamed to a file. From this I also assume that it will recreate the form faster than via code. But on today's computers I don't really know is that is relevant anymore. Can you explain the 'replace at runtime' part a bit more. I'm not sure I understand that statement. :) Thanks, - Graeme - _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Lazarus on Windows + Qt or GTK
Felipe Monteiro de Carvalho wrote: On 7/23/07, Tiziano_mk [EMAIL PROTECTED] wrote: Is this possible? Qt 4 - Afaik Paul is working on it. It should run, even if very unstable =P Gtk 1 - No, forget it Gtk 2 - Theoretically possible, althougth I think that noone worked on it recently Could it be unwise? I think that it just lacks usefulness. Why would you want to do that? It's only an idea, since I see I have the gtk2 libraries installed by Gimp on my Win XP partition, if I use the same widget maybe I have less troubles when I port it on the Ubuntu side of my PC. Another point is that now QT has an open Source licence also on Windows, and this is very interesting... Just to try :-) The only previous reason I can think of would be having Unicode support, but the windows interface is very near of achiaving full Unicode support now. this could be another point... tiziano _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Lazarus on Windows + Qt or GTK
On 7/23/07, Tiziano_mk [EMAIL PROTECTED] wrote: It's only an idea, since I see I have the gtk2 libraries installed by Gimp on my Win XP partition, if I use the same widget maybe I have less troubles when I port it on the Ubuntu side of my PC. In that case it's probably better to just compile LCL. The Gtk 2 interface may require some work to compile under Windows. It should be mostly simple things, like ifdefing parts which require X11. We welcome patches =) thanks, -- Felipe Monteiro de Carvalho _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Form designer code inside .pas unit
On Mon, 23 Jul 2007, Graeme Geldenhuys wrote: On 23/07/07, Michael Van Canneyt [EMAIL PROTECTED] wrote: The .lfm file is not code. It's a resource, which you can replace at runtime. OK, I understand the resource part. It's components that have been streamed to a file. From this I also assume that it will recreate the form faster than via code. But on today's computers I don't really know is that is relevant anymore. No, via code is actually faster. It saves the RTTI lookup etc. Can you explain the 'replace at runtime' part a bit more. I'm not sure I understand that statement. :) The form definition is stored in a resource as text. In theory you can replace the resource with another resource. The translation engine of Delphi relies on this, for instance... Suppose I have a form definition: MyForm Object TMyForm Caption = 'A nice form' Width = 200 Height = 100 end Then it can be replaced in the running binary by e.g. a translated version MyForm Object TMyForm Caption = 'Een leuk venster' Width = 220 Height = 110 end With adapted width and height (a dutch text is usually longer). The alternative version can be loaded from a resource dll, or from file. XML comes to mind: the original author of fpGUI imagined that the original form is stored as XML. It would then be easy to create a second XML 'overload' part which can be used to change the visual appearance of the form. This second XML file could simply be loaded from a file on disk. Using the constructor method, all this is not possible (well, I suppose you could find a way, but it would be less elegant). Since the form definition is now just text, it can be simply replaced with another text. If the form definition was XML, this would actually be very easy. Now it is slightly more complicated. Michael. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Form designer code inside .pas unit
Graeme Geldenhuys wrote: Hi, What are the pros and cons for letting the form designer add code inside the .pas unit instead of a separate .lfm file? For example: Lazarus and Delphi uses external files (.lfm and .dfm) to save information about forms designed using the form designer. .dfm is a straight copy-cat from VB, to obscure code structure for beginners. It's probably one of the worst mistakes Delphi could mimic Visual Studio and CodeGear's C# IDE's use the source code unit directly instead of a external unit. They embed the form/component creation code inside a private method called from the constructor. The code in that private method is also wrapped in C# Region so that it is hidden by default with code folding. Java always did it like this, and now others are starting to mature. So again, what is the pros and cons between the two design choices when using the Object Pascal language? .dfm is good for beginners, who get confused looking at code they didn't write. .pas is good for pros, who need to take control of their project code. Thanks! -- Al _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] mailing list feedback with to large attachments.
Hi, Can the mailing list give feedback if a attachment is to large? Currently it doesn't notify you about anything, so I have no idea of know if others received my post. This is quite annoying. For example: I attached a Linux Font and a Screenshot in a earlier post, but ain't sure if it was over the limit of what the mailing list will accept. I have been bitten by this before with patches as well. Giving feedback if it was rejected would be nice. Regards, - Graeme - _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] mailing list feedback with to large attachments.
Graeme Geldenhuys wrote: Hi, Can the mailing list give feedback if a attachment is to large? Currently it doesn't notify you about anything, so I have no idea of know if others received my post. This is quite annoying. For example: I attached a Linux Font and a Screenshot in a earlier post, but ain't I received both regards -- -hy ___ | | hy-soft data-engineering | |mail: [EMAIL PROTECTED] |--- _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Form designer code inside .pas unit
On Mon, 23 Jul 2007, Al Boldi wrote: Graeme Geldenhuys wrote: Hi, What are the pros and cons for letting the form designer add code inside the .pas unit instead of a separate .lfm file? For example: Lazarus and Delphi uses external files (.lfm and .dfm) to save information about forms designed using the form designer. .dfm is a straight copy-cat from VB, to obscure code structure for beginners. It's probably one of the worst mistakes Delphi could mimic Visual Studio and CodeGear's C# IDE's use the source code unit directly instead of a external unit. They embed the form/component creation code inside a private method called from the constructor. The code in that private method is also wrapped in C# Region so that it is hidden by default with code folding. Java always did it like this, and now others are starting to mature. Java did it, because they had no other choice. The JVM did/does not support resources. So again, what is the pros and cons between the two design choices when using the Object Pascal language? .dfm is good for beginners, who get confused looking at code they didn't write. .pas is good for pros, who need to take control of their project code. Obviously you are unaware of the real reasons the .dfm mechanism was used, otherwise you would not use such unappropriate demeaning tone. There are/were good reasons for it's use. These reasons may have been outdated, but at the time, they were certainly valid. It was (and is, in my opinion) a defendable choice. I have not seen you give any valid and objective reasons why code is better than resources. Unless you plan to give such reasons, I suggest you abstain from such demeaning comments. Michael. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] mailing list feedback with to large attachments.
Graeme Geldenhuys ha scritto: Hi, Can the mailing list give feedback if a attachment is to large? Currently it doesn't notify you about anything, so I have no idea of know if others received my post. This is quite annoying. For example: I attached a Linux Font and a Screenshot in a earlier post, but ain't sure if it was over the limit of what the mailing list will accept. I have been bitten by this before with patches as well. Giving feedback if it was rejected would be nice. You're right in general. However, for the specific issue, your screenshot and font attachment went through. You're right that Courier looks quite horrible. Since Kylix1 I've been using misc-fixed, which looks very similar to your raize, but difference between O and zero is less obvious. Thanks Giuliano _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] GTK2 for arm-linux
Am Sonntag, den 22.07.2007, 18:43 +0200 schrieb Koenraad Lelong: Marc Santhoff schreef: Am Sonntag, den 22.07.2007, 12:44 +0200 schrieb Koenraad Lelong: startx on the board (via ssh) gives me a nice xterm with an active mouse-cursor on the board's LCD. There I can run my old GTK2 application. If I start my lazarus app I get the error-message on the LCD. If I do xinit old-app (again via ssh), I get my old-app running without nice borders etc. xinit lazarus-app gives me the same problem, but the error-message comes in my ssh-shell on the development PC. Just now, from the directory where my app is I did : DISPLAY=:0 ./project1 with the same problem. My Lazarus app is called project1 b.t.w. I don't know why it worked with a glade app, but it looks as if you're not starting the X server at all. Try man startx on the ARM or another machine with full manpages installed. The file startx is a shell script, it reads .xinitrc first and starts the applications and window manager named therein (at the end of the file). Try starting project1 form your ~/.xinitrc to see if that works. HTH, Marc Could you explain why you think the X-server is not started ? I read your mail as you use startx OR project1 - which would have been nonsense. My fault, sorry. I'd try ktrace/strace/truss for looking deeper into the problem. Maybe checking the system log and/or enabling more debugging output where possible would help... Marc _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Making Configure Build Lazarus more user friendly
The configure build lazarus IDE provides a lot of options which the majority of us don't use, but we're however forced to check/uncheck. Therefore I've added a small Group Box, named Quick Configure Options with thre buttons: All, LCL, and Custom. The first two cover (in my opinion) the needs of the vast majority of users, while the third one can be handy. The All Button checks all the Build (or Clean+Build, if Clean All is checked), the LCL button unchecks everything, except LCL (which is set to Build or Clean+Build as above), while Custom unchecks everything. If the idea seems good, the attached patch can be applied, or someone can do it better. If not, I'll just keep it for me, because I find it handy. Giuliano Index: ide/buildlazdialog.pas === --- ide/buildlazdialog.pas (revisione 11586) +++ ide/buildlazdialog.pas (copia locale) @@ -175,6 +175,7 @@ CancelButton: TButton; CleanAllCheckBox: TCheckBox; ConfirmBuildCheckBox: TCheckBox; +BuildOptionsGroupBox: TGroupBox; ItemListHeader: THeaderControl; ItemsListBox: TListBox; LCLInterfaceRadioGroup: TRadioGroup; @@ -182,6 +183,9 @@ OptionsEdit: TEdit; OptionsLabel: TLabel; RestartAfterBuildCheckBox: TCheckBox; +BuildAllSpeedButton: TSpeedButton; +BuildLCLSpeedButton: TSpeedButton; +CustomBuildSpeedButton: TSpeedButton; TargetCPUComboBox: TComboBox; TargetCPULabel: TLabel; TargetDirectoryButton: TButton; @@ -190,8 +194,12 @@ TargetOSEdit: TEdit; TargetOSLabel: TLabel; WithStaticPackagesCheckBox: TCheckBox; +procedure BuildLCLSpeedButtonMouseUp(Sender: TObject; Button: TMouseButton; + Shift: TShiftState; X, Y: Integer); procedure CancelButtonClick(Sender: TObject); procedure CompileButtonClick(Sender: TObject); +procedure CustomBuildSpeedButtonMouseUp(Sender: TObject; + Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); procedure FormCreate(Sender: TObject); procedure FormDestroy(Sender: TObject); @@ -204,6 +212,8 @@ Shift: TShiftState; X, Y: Integer); procedure ItemsListBoxShowHint(Sender: TObject; HintInfo: PHintInfo); procedure SaveSettingsButtonClick(Sender: TObject); +procedure BuildAllSpeedButtonMouseUp(Sender: TObject; Button: TMouseButton; + Shift: TShiftState; X, Y: Integer); procedure TargetDirectoryButtonClick(Sender: TObject); private Options: TBuildLazarusOptions; @@ -837,6 +847,58 @@ ModalResult:=mrOk; end; +procedure TConfigureBuildLazarusDlg.BuildAllSpeedButtonMouseUp(Sender: TObject; + Button: TMouseButton; Shift: TShiftState; X, Y: Integer); +var + i: Integer; + Spb: TSpeedButton; + mm: TMakeMode; +begin + Spb := Sender as TSpeedButton; + if not Spb.Down then exit; + if CleanAllCheckBox.Checked then mm := mmCleanBuild + else mm := mmBuild; + for i := 0 to OPtions.Count-1 do begin +Options.Items[i].MakeMode := mm; +end; + ItemsListBox.Invalidate; +end; + +procedure TConfigureBuildLazarusDlg.BuildLCLSpeedButtonMouseUp(Sender: TObject; + Button: TMouseButton; Shift: TShiftState; X, Y: Integer); +var + i: Integer; + Spb: TSpeedButton; + mm: TMakeMode; +begin + Spb := Sender as TSpeedButton; + if not Spb.Down then exit; + if CleanAllCheckBox.Checked then mm := mmCleanBuild + else mm := mmBuild; + for i := 0 to OPtions.Count-1 do begin +If Options.Items[i].Description = 'LCL' then + Options.Items[i].MakeMode := mm +else + Options.Items[i].MakeMode := mmNone; +end; + ItemsListBox.Invalidate; + +end; + +procedure TConfigureBuildLazarusDlg.CustomBuildSpeedButtonMouseUp( + Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); +var + i: Integer; + Spb: TSpeedButton; +begin + Spb := Sender as TSpeedButton; + if not Spb.Down then exit; + for i := 0 to OPtions.Count-1 do begin +Options.Items[i].MakeMode := mmNone; +end; + ItemsListBox.Invalidate; +end; + procedure TConfigureBuildLazarusDlg.TargetDirectoryButtonClick(Sender: TObject); var AFilename: String; Index: ide/buildlazdialog.lrs === --- ide/buildlazdialog.lrs (revisione 11586) +++ ide/buildlazdialog.lrs (copia locale) @@ -10,109 +10,120 @@ +'lose'#8'OnCreate'#7#10'FormCreate'#9'OnDestroy'#7#11'FormDestroy'#8'Positio' +'n'#7#14'poScreenCenter'#0#6'TLabel'#12'OptionsLabel'#22'AnchorSideLeft.Cont' +'rol'#7#12'ItemsListBox'#21'AnchorSideTop.Control'#7#12'ItemsListBox'#18'Anc' - +'horSideTop.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2#14#3'Top'#3#26#1#5 - +'Width'#2'*'#17'BorderSpacing.Top'#2#18#7'Caption'#6#8'Options:'#5'Color'#7#6 - +'clNone'#11'ParentColor'#8#0#0#6'TLabel'#13'TargetOSLabel'#22'AnchorSideLeft' -
Re: [lazarus] Form designer code inside .pas unit
Michael Van Canneyt wrote: On Mon, 23 Jul 2007, Al Boldi wrote: Graeme Geldenhuys wrote: So again, what is the pros and cons between the two design choices when using the Object Pascal language? .dfm is good for beginners, who get confused looking at code they didn't write. .pas is good for pros, who need to take control of their project code. Obviously you are unaware of the real reasons the .dfm mechanism was used, otherwise you would not use such unappropriate demeaning tone. No offense meant. The .lfm is probably there for compatibility reasons. There are/were good reasons for it's use. These reasons may have been outdated, but at the time, they were certainly valid. It was (and is, in my opinion) a defendable choice. I have not seen you give any valid and objective reasons why code is better than resources. Unless you plan to give such reasons, I suggest you abstain from such demeaning comments. This really has nothing to do with resources. Resources should still be saved in its own .res file. This is about code init, and as such should not be mutilated into some obscure hardcoded code init translator, but instead be obviously exposed for code control. Thanks! -- Al _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Making Configure Build Lazarus more user friendly
En/na Giuliano Colla ha escrit: The All Button checks all the Build (or Clean+Build, if Clean All is checked), You can do that now by clicking on the column header for clean+build (the rightmost one) the LCL button unchecks everything, except LCL (which is set to Build or Clean+Build as above), Two clicks: one on the column header with the red cross (the leftmost one), then click on build or clean+build for the lcl while Custom unchecks everything. click on the column header with the red cross. Bye -- Luca _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Making Configure Build Lazarus more user friendly
Giuliano Colla wrote: The configure build lazarus IDE provides a lot of options which the majority of us don't use, but we're however forced to check/uncheck. Therefore I've added a small Group Box, named Quick Configure Options with thre buttons: All, LCL, and Custom. The first two cover (in my opinion) the needs of the vast majority of users, while the third one can be handy. The All Button checks all the Build (or Clean+Build, if Clean All is checked), the LCL button unchecks everything, except LCL (which is set to Build or Clean+Build as above), while Custom unchecks everything. If the idea seems good, the attached patch can be applied, or someone can do it better. If not, I'll just keep it for me, because I find it handy. This is great, but there is one important option missing: Build Packages which would turn off everything, except IDE with Packages. Thanks! -- Al _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Component or library for HTTP and/or WebDAV protocol on Mac OS X
Hello, I am looking for a component or library which will eventually enable me to access a WebDAV server from my client application, which I am making with Lazarus. Is there a recommended component or library for HTTP, or even WebDAV? I am ready to invest a lot of time into this, so if I have to create something new or port a library that currently works on Windows or Linux, how should I proceed? Is there a library that I should port over to Macintosh? Probably not Indy 10? Should I try to use the Carbon API or Unix sockets? Any advice or opinions are very welcome. Cheers, Tobias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Component or library for HTTP and/or WebDAV protocol on Mac OS X
On Mon, 23 Jul 2007, Tobias Giesen wrote: Hello, I am looking for a component or library which will eventually enable me to access a WebDAV server from my client application, which I am making with Lazarus. Is there a recommended component or library for HTTP, or even WebDAV? There is code for HTTP (synapse, Indy, ICS, lnet). I have code for Webdav, which I plucked from internet somewhere, and which I corrected and enhanced. I am ready to invest a lot of time into this, so if I have to create something new or port a library that currently works on Windows or Linux, how should I proceed? Is there a library that I should port over to Macintosh? Probably not Indy 10? Should I try to use the Carbon API or Unix sockets? I suggest you use one of the above sets. The webdav component can still be found on internet (I think I got it from Torry's pages), but if you don't find it, I can always send you a copy. Michael. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Form designer code inside .pas unit
On Mon, 23 Jul 2007, Al Boldi wrote: Michael Van Canneyt wrote: On Mon, 23 Jul 2007, Al Boldi wrote: Graeme Geldenhuys wrote: So again, what is the pros and cons between the two design choices when using the Object Pascal language? .dfm is good for beginners, who get confused looking at code they didn't write. .pas is good for pros, who need to take control of their project code. Obviously you are unaware of the real reasons the .dfm mechanism was used, otherwise you would not use such unappropriate demeaning tone. No offense meant. The .lfm is probably there for compatibility reasons. Indeed. It was a discussion point when Lazarus (or it's precursor Megido) was started. There are/were good reasons for it's use. These reasons may have been outdated, but at the time, they were certainly valid. It was (and is, in my opinion) a defendable choice. I have not seen you give any valid and objective reasons why code is better than resources. Unless you plan to give such reasons, I suggest you abstain from such demeaning comments. This really has nothing to do with resources. Resources should still be saved in its own .res file. Forms are stored in resources. A dfm is changed to resource and then compiled in the binary ? This is about code init, and as such should not be mutilated into some obscure hardcoded code init translator, but instead be obviously exposed for code control. There is certainly something to be said for this point of view, but they obviously thought otherwise: Do not forget that in the TP days, it was done like you propose, with their Turbo Vision. If they switched to resources, they probably had their reasons for it. Two of them, which I happen to know, I explained in my initial response to Graeme. There is always a history for each choice. This is so for Delphi, and for FPC/Lazarus too. People may not know it any more after X years, but that doesn't mean it didn't exist. At best, you can question it's current validity. Michael. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Component or library for HTTP and/or WebDAV protocol on Mac OS X
Michael wrote: There is code for HTTP (synapse, Indy, ICS, lnet). I have code for Webdav, which I plucked from internet somewhere, and which I corrected and enhanced. Hi Michael, thanks for the quick reply! Are you using WebDAV on Windows? Do you think any of (synapse, Indy, ICS, lnet) might be suited best for a Mac OS X port? I also need https ... Cheers, Tobias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
RE: [lazarus] Component or library for HTTP and/or WebDAV protocol on Mac OS X
Synapse compiles okay on OS X, but it crashes at startup. I'm still investigating why as it works fine on Windows. I'm using Synapse with the Web Service Toolkit. http://www.ararat.cz/synapse/ http://wiki.lazarus.freepascal.org/Web_Service_Toolkit Thanks. -Phil -Original Message- From: Tobias Giesen [mailto:[EMAIL PROTECTED] Sent: Monday, July 23, 2007 9:36 AM To: lazarus@miraclec.com Subject: [lazarus] Component or library for HTTP and/or WebDAV protocol on Mac OS X Hello, I am looking for a component or library which will eventually enable me to access a WebDAV server from my client application, which I am making with Lazarus. Is there a recommended component or library for HTTP, or even WebDAV? I am ready to invest a lot of time into this, so if I have to create something new or port a library that currently works on Windows or Linux, how should I proceed? Is there a library that I should port over to Macintosh? Probably not Indy 10? Should I try to use the Carbon API or Unix sockets? Any advice or opinions are very welcome. Cheers, Tobias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Component or library for HTTP and/or WebDAV protocol on Mac OS X
On Mon, 23 Jul 2007, Tobias Giesen wrote: Michael wrote: There is code for HTTP (synapse, Indy, ICS, lnet). I have code for Webdav, which I plucked from internet somewhere, and which I corrected and enhanced. Hi Michael, thanks for the quick reply! Are you using WebDAV on Windows? Yes (using Delphi, though) Do you think any of (synapse, Indy, ICS, lnet) might be suited best for a Mac OS X port? I also need https ... I use Indy, but I think the component was originally written for Synapse. Since I used Indy for the rest of my code, I changed the back-end. Synapse is more simple than Indy, so I suggest you use that. As far as I know, it should work out of the box on Mac. Michael. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Making Configure Build Lazarus more user friendly
Zitat von Al Boldi [EMAIL PROTECTED]: Giuliano Colla wrote: The configure build lazarus IDE provides a lot of options which the majority of us don't use, but we're however forced to check/uncheck. Therefore I've added a small Group Box, named Quick Configure Options with thre buttons: All, LCL, and Custom. The first two cover (in my opinion) the needs of the vast majority of users, while the third one can be handy. The All Button checks all the Build (or Clean+Build, if Clean All is checked), the LCL button unchecks everything, except LCL (which is set to Build or Clean+Build as above), while Custom unchecks everything. If the idea seems good, the attached patch can be applied, or someone can do it better. If not, I'll just keep it for me, because I find it handy. This is great, but there is one important option missing: Build Packages which would turn off everything, except IDE with Packages. Maybe there should be two pages: One with a simple radiogroup called 'Common' and the other with the current options called 'Advanced'. Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] mailing list feedback with to large attachments.
On Mon, 23 Jul 2007, Graeme Geldenhuys wrote: On 23/07/07, hy-soft [EMAIL PROTECTED] wrote: I received both Thanks for confirming that. What is the attachment limit on the mailing list. I'm not sure if it is 20k or 40k? I believe it is set at 50K. I'll check and if it is different then that I'll let you know. -- Programming my first best destiny! Michael A. Hess Miracle Concepts, Inc. [EMAIL PROTECTED] http://www.miraclec.com Phone: 570-388-2211 Fax: 570-388-6101 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Making Configure Build Lazarus more user friendly
On Mon, 23 Jul 2007, Mattias Gärtner wrote: Zitat von Al Boldi [EMAIL PROTECTED]: Giuliano Colla wrote: The configure build lazarus IDE provides a lot of options which the majority of us don't use, but we're however forced to check/uncheck. Therefore I've added a small Group Box, named Quick Configure Options with thre buttons: All, LCL, and Custom. The first two cover (in my opinion) the needs of the vast majority of users, while the third one can be handy. The All Button checks all the Build (or Clean+Build, if Clean All is checked), the LCL button unchecks everything, except LCL (which is set to Build or Clean+Build as above), while Custom unchecks everything. If the idea seems good, the attached patch can be applied, or someone can do it better. If not, I'll just keep it for me, because I find it handy. This is great, but there is one important option missing: Build Packages which would turn off everything, except IDE with Packages. Maybe there should be two pages: One with a simple radiogroup called 'Common' and the other with the current options called 'Advanced'. I second this :-) Michael.
Re: [lazarus] Form designer code inside .pas unit
On Mon, 23 Jul 2007, Al Boldi wrote: Michael Van Canneyt wrote: On Mon, 23 Jul 2007, Al Boldi wrote: This really has nothing to do with resources. Resources should still be saved in its own .res file. Forms are stored in resources. A dfm is changed to resource and then compiled in the binary ? The .dfm is being used for two things: 1. create resource 2. create code init It's the code init that's objectionable, because it removes code control. Agreed, but I think this is a minor problem, as the code is not useful or interesting anyway. Just creating components and setting properties. The few exceptional cases where you need extra control can be implemented in the OnCreate, OnShow events or in the worst case the Loaded procedure. This is about code init, and as such should not be mutilated into some obscure hardcoded code init translator, but instead be obviously exposed for code control. There is certainly something to be said for this point of view, but they obviously thought otherwise: Do not forget that in the TP days, it was done like you propose, with their Turbo Vision. Was Turbo Vision the Delphi codename, or do you mean Object Vision? No, Turbo Vision was a text based widget set for the Turbo Pascal IDE. FPC has it in the form of Free Vision, it is used in the text mode IDE. If they switched to resources, they probably had their reasons for it. Two of them, which I happen to know, I explained in my initial response to Graeme. I think they changed because they saw VB, and wanted to mimic them. This doesn't mean Delphi was a VB copy-cat, on the contrary, VB was an Object Vision copy-cat, but VB beat Delphi to market, then Delphi copied VB's .frm. I doubt it; It does not correspond with the information which I have about how Delphi was started. But no matter. Michael. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] mailing list feedback with to large attachments.
Michael A. Hess wrote: On Mon, 23 Jul 2007, Graeme Geldenhuys wrote: On 23/07/07, hy-soft [EMAIL PROTECTED] wrote: I received both Thanks for confirming that. What is the attachment limit on the mailing list. I'm not sure if it is 20k or 40k? I believe it is set at 50K. I'll check and if it is different then that I'll let you know. Michael, do you mind kicking the ass of the mailer at lazarus.freepascal.org as well? I can get it to send registration-password... tia, john _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] mailing list feedback with to large attachments.
On Mon, 23 Jul 2007, John vd Waeter wrote: Michael, do you mind kicking the ass of the mailer at lazarus.freepascal.org as well? I can get it to send registration-password... I saw the emails about this. Sorry I was on vacation for the last week and planned to look into why you didn't get the confirmation. Strange since you are able to get emails from the list which is the same server. I'll get back to you. -- Programming my first best destiny! Michael A. Hess Miracle Concepts, Inc. [EMAIL PROTECTED] http://www.miraclec.com Phone: 570-388-2211 Fax: 570-388-6101 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Form designer code inside .pas unit
Zitat von Al Boldi [EMAIL PROTECTED]: Michael Van Canneyt wrote: On Mon, 23 Jul 2007, Al Boldi wrote: Graeme Geldenhuys wrote: So again, what is the pros and cons between the two design choices when using the Object Pascal language? .dfm is good for beginners, who get confused looking at code they didn't write. .pas is good for pros, who need to take control of their project code. Obviously you are unaware of the real reasons the .dfm mechanism was used, otherwise you would not use such unappropriate demeaning tone. No offense meant. The .lfm is probably there for compatibility reasons. Well, using a similar system like Delphi makes porting easier. But it is not there for 'Delphi compatibility'. The .lfm is used because: - a separate file is independent of syntax errors in the source code - the file format should be easy to read/stream The lfm reader/writer was at hand at the time. Nowadays we could use the xml reader/writer too, although that is less human readable. Using pascal source as file format would be possible and has some advantages but some disadvantages as well. There are/were good reasons for it's use. These reasons may have been outdated, but at the time, they were certainly valid. It was (and is, in my opinion) a defendable choice. I have not seen you give any valid and objective reasons why code is better than resources. Unless you plan to give such reasons, I suggest you abstain from such demeaning comments. This really has nothing to do with resources. Resources should still be saved in its own .res file. This is about code init, and as such should not be mutilated into some obscure hardcoded code init translator, but instead be obviously exposed for code control. Well, it is exposed, because it is a simple text file. And you can edit it in the IDE (just make sure to close the designed form, while doing so). If we would switch the lfm file format to a more pascal like dialect you will not get more code control, because the parser will not understand your extensions. Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Making Configure Build Lazarus more user friendly
Mattias Gärtner wrote: Zitat von Al Boldi [EMAIL PROTECTED]: Giuliano Colla wrote: The configure build lazarus IDE provides a lot of options which the majority of us don't use, but we're however forced to check/uncheck. Therefore I've added a small Group Box, named Quick Configure Options with thre buttons: All, LCL, and Custom. The first two cover (in my opinion) the needs of the vast majority of users, while the third one can be handy. The All Button checks all the Build (or Clean+Build, if Clean All is checked), the LCL button unchecks everything, except LCL (which is set to Build or Clean+Build as above), while Custom unchecks everything. If the idea seems good, the attached patch can be applied, or someone can do it better. If not, I'll just keep it for me, because I find it handy. This is great, but there is one important option missing: Build Packages which would turn off everything, except IDE with Packages. Maybe there should be two pages: One with a simple radiogroup called 'Common' and the other with the current options called 'Advanced'. Instead of pages, have an Advanced button that fold and unfold additional config. Thanks! -- Al _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Form designer code inside .pas unit
On Mon, 23 Jul 2007, Sergei Gorelkin wrote: Michael Van Canneyt wrote: On Mon, 23 Jul 2007, Graeme Geldenhuys wrote: On 23/07/07, Michael Van Canneyt [EMAIL PROTECTED] wrote: The .lfm file is not code. It's a resource, which you can replace at runtime. OK, I understand the resource part. It's components that have been streamed to a file. From this I also assume that it will recreate the form faster than via code. But on today's computers I don't really know is that is relevant anymore. No, via code is actually faster. It saves the RTTI lookup etc. Can you explain the 'replace at runtime' part a bit more. I'm not sure I understand that statement. :) The form definition is stored in a resource as text. In theory you can replace the resource with another resource. The translation engine of Delphi relies on this, for instance... Suppose I have a form definition: MyForm Object TMyForm Caption = 'A nice form' Width = 200 Height = 100 end Then it can be replaced in the running binary by e.g. a translated version MyForm Object TMyForm Caption = 'Een leuk venster' Width = 220 Height = 110 end With adapted width and height (a dutch text is usually longer). This issue comes (in Delphi) from the absense of layout manager. In fpGUI or GTK, you can simply translate the necessary strings, and the form will realign itself properly. IIRC, gtk/glade has single XML file in which the strings that need translation are marked as such. The translation is done with gettext, using .mo files. Yes, but this is a crude mechanism... The alternative version can be loaded from a resource dll, or from file. XML comes to mind: the original author of fpGUI imagined that the original form is stored as XML. It would then be easy to create a second XML 'overload' part which can be used to change the visual appearance of the form. This second XML file could simply be loaded from a file on disk. A thing that I must mention is at runtime and at initialization are not the same. Typical program state is not limited to form resources, it includes non-published properties, manually created objects, etc. At initialization time this state is generally known, but later on it is not. All attempts to reload resources at the middle of execution that I have seen were a mix of hacks with black magic, and work only in particular cases. Could be, I don't have bad experiences :-) Using the constructor method, all this is not possible (well, I suppose you could find a way, but it would be less elegant). Since the form definition is now just text, it can be simply replaced with another text. If the form definition was XML, this would actually be very easy. Now it is slightly more complicated. Not too much complicated, I believe: 1) Declare translatable properties as a separate type ( like 'type TTranslateString = type string;' ) 2) While generating code, wrap strings that are being assigned to such properties into gettext call ( e.g. Label1.Caption := _('Caption'); ) This is so, but you are limiting yourself to the translation. The overlaying mechanism could be used to implement rudimentary theming, for instance. To reuse my example: Original: MyForm Object TMyForm Caption = 'A nice form' Width = 200 Height = 100 end Overlay: MyForm Object TMyForm Caption = 'Een leuk venster' Width = 220 Height = 110 Color = clYellow Icon = some icon resource end I'm not saying that this is the way to go; All I was saying is that this was one of the ideas behind using resources instead of using code; it requires no extra streaming code: it's all already there. What's more, the additional resources can be inserted later at any time; With code this is harder to do. You may need to re-generate all existing code, and make sure you don't destroy any modifications the user made in the code. With resources, it's 1 extra call. Michael. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Form designer code inside .pas unit
Michael Van Canneyt wrote: On Mon, 23 Jul 2007, Al Boldi wrote: This really has nothing to do with resources. Resources should still be saved in its own .res file. Forms are stored in resources. A dfm is changed to resource and then compiled in the binary ? The .dfm is being used for two things: 1. create resource 2. create code init It's the code init that's objectionable, because it removes code control. This is about code init, and as such should not be mutilated into some obscure hardcoded code init translator, but instead be obviously exposed for code control. There is certainly something to be said for this point of view, but they obviously thought otherwise: Do not forget that in the TP days, it was done like you propose, with their Turbo Vision. Was Turbo Vision the Delphi codename, or do you mean Object Vision? If they switched to resources, they probably had their reasons for it. Two of them, which I happen to know, I explained in my initial response to Graeme. I think they changed because they saw VB, and wanted to mimic them. This doesn't mean Delphi was a VB copy-cat, on the contrary, VB was an Object Vision copy-cat, but VB beat Delphi to market, then Delphi copied VB's .frm. There is always a history for each choice. This is so for Delphi, and for FPC/Lazarus too. People may not know it any more after X years, but that doesn't mean it didn't exist. At best, you can question it's current validity. Thanks! -- Al _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Lazarus on Windows + Qt or GTK
On Monday 23 July 2007 12:21, Felipe Monteiro de Carvalho wrote: On 7/23/07, Tiziano_mk [EMAIL PROTECTED] wrote: Is this possible? Qt 4 - Afaik Paul is working on it. It should run, even if very unstable =P actually, it works on windows, but we have to fix painting issues with synedit, and positioning of TGraphicControl descendants (it's linux problem too), so qt-lazarus IDE is currently unuseable, but Qt LCL have nice progress, and hope that at 0.24 release brings to us useable qt widgetset (won't say beta yet ;)). _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Form designer code inside .pas unit
Mattias Gärtner wrote: Zitat von Al Boldi [EMAIL PROTECTED]: Michael Van Canneyt wrote: On Mon, 23 Jul 2007, Al Boldi wrote: Graeme Geldenhuys wrote: So again, what is the pros and cons between the two design choices when using the Object Pascal language? .dfm is good for beginners, who get confused looking at code they didn't write. .pas is good for pros, who need to take control of their project code. Obviously you are unaware of the real reasons the .dfm mechanism was used, otherwise you would not use such unappropriate demeaning tone. No offense meant. The .lfm is probably there for compatibility reasons. Well, using a similar system like Delphi makes porting easier. But it is not there for 'Delphi compatibility'. The .lfm is used because: - a separate file is independent of syntax errors in the source code - the file format should be easy to read/stream The lfm reader/writer was at hand at the time. Nowadays we could use the xml reader/writer too, although that is less human readable. Using pascal source as file format would be possible and has some advantages but some disadvantages as well. What are the disadvantages? There are/were good reasons for it's use. These reasons may have been outdated, but at the time, they were certainly valid. It was (and is, in my opinion) a defendable choice. I have not seen you give any valid and objective reasons why code is better than resources. Unless you plan to give such reasons, I suggest you abstain from such demeaning comments. This really has nothing to do with resources. Resources should still be saved in its own .res file. This is about code init, and as such should not be mutilated into some obscure hardcoded code init translator, but instead be obviously exposed for code control. Well, it is exposed, because it is a simple text file. And you can edit it in the IDE (just make sure to close the designed form, while doing so). If we would switch the lfm file format to a more pascal like dialect you will not get more code control, because the parser will not understand your extensions. Replacing the parser with a jit compilation may solve this problem. Thanks! -- Al _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Code Folding regions in Lazarus
Zitat von Graeme Geldenhuys [EMAIL PROTECTED]: Hi, Does Lazarus support some sort of code folding 'region' keyword like the Visual Studio IDE does? I know Lazarus automatically handle begin..end etc. But can the user add there own code folding regions around their code. Here is an example of regions used in the Visual Studio IDE for C# code #Region Windows Form Designer generated code ... System.Diagnostics.DebuggerStepThrough() _ Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container ... Me.ImageList1 = _ New System.Windows.Forms.ImageList(Me.components) ... #End Region Just add that to the highlighter TSynPasSyn and it will support it. Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Code Folding regions in Lazarus
Mattias Gärtner escribió: Zitat von Graeme Geldenhuys [EMAIL PROTECTED]: Hi, Does Lazarus support some sort of code folding 'region' keyword like the Visual Studio IDE does? I know Lazarus automatically handle begin..end etc. But can the user add there own code folding regions around their code. Here is an example of regions used in the Visual Studio IDE for C# code #Region Windows Form Designer generated code ... System.Diagnostics.DebuggerStepThrough() _ Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container ... Me.ImageList1 = _ New System.Windows.Forms.ImageList(Me.components) ... #End Region Just add that to the highlighter TSynPasSyn and it will support it. Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives Hello guys! In CodeGear that is achieved with these tags: {$REGION 'Description about the fold'} Code .. .. {$ENDREGION} Might it helps! _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Making Configure Build Lazarus more user friendly
Mattias Gärtner ha scritto: Zitat von Al Boldi [EMAIL PROTECTED]: Giuliano Colla wrote: The configure build lazarus IDE provides a lot of options which the majority of us don't use, but we're however forced to check/uncheck. Therefore I've added a small Group Box, named Quick Configure Options with thre buttons: All, LCL, and Custom. The first two cover (in my opinion) the needs of the vast majority of users, while the third one can be handy. The All Button checks all the Build (or Clean+Build, if Clean All is checked), the LCL button unchecks everything, except LCL (which is set to Build or Clean+Build as above), while Custom unchecks everything. If the idea seems good, the attached patch can be applied, or someone can do it better. If not, I'll just keep it for me, because I find it handy. This is great, but there is one important option missing: Build Packages which would turn off everything, except IDE with Packages. Maybe there should be two pages: One with a simple radiogroup called 'Common' and the other with the current options called 'Advanced'. This was my original idea, but I've been too lazy to implement it :-( Giuliano _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Form designer code inside .pas unit
Michael Van Canneyt wrote: On Mon, 23 Jul 2007, Sergei Gorelkin wrote: Michael Van Canneyt wrote: On Mon, 23 Jul 2007, Graeme Geldenhuys wrote: On 23/07/07, Michael Van Canneyt [EMAIL PROTECTED] wrote: The .lfm file is not code. It's a resource, which you can replace at runtime. OK, I understand the resource part. It's components that have been streamed to a file. From this I also assume that it will recreate the form faster than via code. But on today's computers I don't really know is that is relevant anymore. No, via code is actually faster. It saves the RTTI lookup etc. Can you explain the 'replace at runtime' part a bit more. I'm not sure I understand that statement. :) The form definition is stored in a resource as text. In theory you can replace the resource with another resource. The translation engine of Delphi relies on this, for instance... Suppose I have a form definition: MyForm Object TMyForm Caption = 'A nice form' Width = 200 Height = 100 end Then it can be replaced in the running binary by e.g. a translated version MyForm Object TMyForm Caption = 'Een leuk venster' Width = 220 Height = 110 end With adapted width and height (a dutch text is usually longer). This issue comes (in Delphi) from the absense of layout manager. In fpGUI or GTK, you can simply translate the necessary strings, and the form will realign itself properly. IIRC, gtk/glade has single XML file in which the strings that need translation are marked as such. The translation is done with gettext, using .mo files. Yes, but this is a crude mechanism... Crude as it may seem, it is a lesser of two evils. Having an application with 10 forms, localized into 10 languages means that you have 100 files to maintain. If any one of these 100 gets outdated (in terms of adding/deleting objects; merely changing properties is not so dangerous), application will most probably not run at all. Otoh, the ability to update resources independently of code is probably valuable for closed-source projects. Using the constructor method, all this is not possible (well, I suppose you could find a way, but it would be less elegant). Since the form definition is now just text, it can be simply replaced with another text. If the form definition was XML, this would actually be very easy. Now it is slightly more complicated. Not too much complicated, I believe: 1) Declare translatable properties as a separate type ( like 'type TTranslateString = type string;' ) 2) While generating code, wrap strings that are being assigned to such properties into gettext call ( e.g. Label1.Caption := _('Caption'); ) This is so, but you are limiting yourself to the translation. The overlaying mechanism could be used to implement rudimentary theming, for instance. To reuse my example: Original: MyForm Object TMyForm Caption = 'A nice form' Width = 200 Height = 100 end Overlay: MyForm Object TMyForm Caption = 'Een leuk venster' Width = 220 Height = 110 Color = clYellow Icon = some icon resource end Theming may also be implemented by using string substitution mechanism. All you have to do is declare styles that are referenced by name (and this is also key point of fpGUI!). I'm not saying that this is the way to go; All I was saying is that this was one of the ideas behind using resources instead of using code; it requires no extra streaming code: it's all already there. What's more, the additional resources can be inserted later at any time; With code this is harder to do. You may need to re-generate all existing code, and make sure you don't destroy any modifications the user made in the code. With resources, it's 1 extra call. A working implementation with code can be found in MCK project (part of KOL/MCK). It writes auto-generated code into a separate file that is included by main source and is not intended to be edited by users. Probably that file is regenerated on every save, but I am not sure. Sergei _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Form designer code inside .pas unit
On Mon, Jul 23, 2007 at 02:49:47PM +0300, Al Boldi wrote: directly instead of a external unit. They embed the form/component creation code inside a private method called from the constructor. The code in that private method is also wrapped in C# Region so that it is hidden by default with code folding. Java always did it like this, and now others are starting to mature. Yes, and I hated it (JBuilder 6 to be exact). Small changes in the code constantly crashed the form designer. So again, what is the pros and cons between the two design choices when using the Object Pascal language? .dfm is good for beginners, who get confused looking at code they didn't write. .pas is good for pros, who need to take control of their project code. In practice you can't touch the generated code or the markers around it, since that leads to frequent crashes. Actually my personal experience is that mucking around in the Delphi DFM (e.g. to change inheritence) is safer than mucking around in the java generated code of JBuilder 6 (not to speak of Visual Cafe) _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Form designer code inside .pas unit
On 23/07/07, Mattias Gärtner [EMAIL PROTECTED] wrote: The lfm reader/writer was at hand at the time. Nowadays we could use the xml reader/writer too, although that is less human readable. Using pascal source as file format would be possible and has some advantages but some disadvantages as well. Mattias, these are the things I would like to find out. What are the advantages and disadvantages of using a single pascal unit for code and form designer information. Like I mentioned before, calling a private method from the constructor to build the GUI. The form designer maintains that private method's content. Regards, - Graeme - _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Problem with lazreport
Hi! Im trying to install lazreport package. Under my Linux box, it Works OK but under my Windows box there is no way to make it work. After rebuilding lazarus (no errors) the tiger appears, and then nothing happens. Lazarus never starts. The only strange thing I noticed, is the size of the new lazarus.exe: allmost 33MB against the 9MB of the oldest one. I work with Windows vista 64 bits, lazarus 0.9.22 beta fcp 2.0.4 Any idea?? Bests regards Germán C. Basisty Estudio Informático Patagónico Consultor tel. +54 (2942) 15 472 223 [EMAIL PROTECTED] http://www.eipsistemas.ath.cx http://www.eipsistemas.ath.cx/
Re: [lazarus] Problem with lazreport
If a tiger appears you have a real problem. Then the Lazarus cheetah has run away. ;-) Currently it's not possible to use lazreport (and some other packages) with the win64 version of Lazarus. You can alternatively install the win32 version. Best regards, Swen German C. Basisty schrieb: Hi! I'm trying to install lazreport package. Under my Linux box, it Works OK but under my Windows box there is no way to make it work. After rebuilding lazarus (no errors) the tiger appears, and then nothing happens. Lazarus never starts. The only strange thing I noticed, is the size of the new lazarus.exe: allmost 33MB against the 9MB of the oldest one. I work with Windows vista 64 bits, lazarus 0.9.22 beta fcp 2.0.4 Any idea?? Bests regards *Germán C. Basisty* *Estudio Informático Patagónico* */Consultor /* tel. +54 (2942) 15 472 223 [EMAIL PROTECTED] http://www.eipsistemas.ath.cx http://www.eipsistemas.ath.cx/
RE: [lazarus] Problem with lazreport
Be cool, its a cheetah, dont worry! I have the 32 bits version of lazarus running on Windows vista 64 bits. Perhaps it is a OS incompatibility issue, because on a virtual machine with xp 32 bits, the same lazarus works properly. Regards Germán C. Basisty Estudio Informático Patagónico Consultor tel. +54 (2942) 15 472 223 [EMAIL PROTECTED] http://www.eipsistemas.ath.cx/ http://www.eipsistemas.ath.cx De: Swen Heinig [mailto:[EMAIL PROTECTED] Enviado el: lunes, 23 de julio de 2007 06:33 p.m. Para: lazarus@miraclec.com Asunto: Re: [lazarus] Problem with lazreport If a tiger appears you have a real problem. Then the Lazarus cheetah has run away. ;-) Currently it's not possible to use lazreport (and some other packages) with the win64 version of Lazarus. You can alternatively install the win32 version. Best regards, Swen German C. Basisty schrieb: Hi! Im trying to install lazreport package. Under my Linux box, it Works OK but under my Windows box there is no way to make it work. After rebuilding lazarus (no errors) the tiger appears, and then nothing happens. Lazarus never starts. The only strange thing I noticed, is the size of the new lazarus.exe: allmost 33MB against the 9MB of the oldest one. I work with Windows vista 64 bits, lazarus 0.9.22 beta fcp 2.0.4 Any idea?? Bests regards Germán C. Basisty Estudio Informático Patagónico Consultor tel. +54 (2942) 15 472 223 [EMAIL PROTECTED] http://www.eipsistemas.ath.cx http://www.eipsistemas.ath.cx/
[lazarus] IDE dialog position question and the IDE
I run dual monitors, with a desktop size of 2560x1024 Nearly every dialog used by Lazarus is set poDesktopCenter, which splits right down the middle of my two monitors, leaving half the dialog on each monitor. Is there anything that can be done to change this? Almost every piece of Linux software I run that pops up a centered dialog centers it to one monitor or the other automatically... Windows is another story, I can't get a darn thing to not bridge the center of the screen in Windows lol. I've tried every window position known to man with a test form... poDesktopCenter and poScreenCenter both do the same thing for me in both GTK1 and GTK2. They place the form centered vertically and pushed up against the edge of the screen at the split, but it doesn't split across both screens. So, for a window, I am unable to reproduce what's happening with the IDE. Dialogs I open such as showmessage() still bridge the center. -Tony
Re: [lazarus] Code Folding regions in Lazarus
Raistware wrote: Mattias Gärtner escribió: Zitat von Graeme Geldenhuys [EMAIL PROTECTED]: Hi, Does Lazarus support some sort of code folding 'region' keyword like the Visual Studio IDE does? I know Lazarus automatically handle begin..end etc. But can the user add there own code folding regions around their code. Here is an example of regions used in the Visual Studio IDE for C# code #Region Windows Form Designer generated code ... System.Diagnostics.DebuggerStepThrough() _ Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container ... Me.ImageList1 = _ New System.Windows.Forms.ImageList(Me.components) ... #End Region Just add that to the highlighter TSynPasSyn and it will support it. Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives Hello guys! In CodeGear that is achieved with these tags: {$REGION 'Description about the fold'} Code .. .. {$ENDREGION} For IDE related hits, I would prefer {%REGION 'Description about the fold'} Code .. .. {%ENDREGION} (since it is no compiler directive) Marc _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Form designer code inside .pas unit
Al Boldi wrote: Michael Van Canneyt wrote: On Mon, 23 Jul 2007, Al Boldi wrote: This really has nothing to do with resources. Resources should still be saved in its own .res file. Forms are stored in resources. A dfm is changed to resource and then compiled in the binary ? The .dfm is being used for two things: 1. create resource 2. create code init huh... since when does a dfm contain code ? Marc _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] GTK2 for arm-linux
Koenraad Lelong wrote: Marc Weustink schreef: Sam Liddicott wrote: I may be asking obvious questions here, but you didn't reveal a lot about your setup. Do you event have a DISPLAY environment variable set? Instead of setting your env, you can also start your app like: your_app --display=yourserver:0 Marc Tried this, and got another result. ./project1 --display=viper:0 gives : [FORMS.PP] ExceptionOccured Sender=EReadError Exception=Invalid Filer Signature Stack Trace: ... TApplication.HandleException Invalid Filer Signature Stack trace: ... then a form appears (with a red circle with a white bar in it) : Invalid Filer Signature Press OK to ingore and risk data corruption. Press Cancel to kill the program [ OK ] [ Cancel ] And the form seems to respond to a click on one of the buttons, it terminates the application. This is some progress, thanks. Other suggestions ? at leas this is no: Gtk-WARNING **: cannot open display: so you now have your display and ran into a complete different problem. Exception=Invalid Filer Signature: maybe some endian issue or a corrupt file or a bad compiled string constant (the form layout is stored internally in a string) Maybe, as a test, you can write the contents of the result of LazarusResources.Find('TForm'):TLResource directly after the line {$I unit1.lrs} in the initialization section of your form. (and compare this to the contents of unit1.lrs) Marc _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] GTK2 for arm-linux
On 23/07/07, Marc Weustink [EMAIL PROTECTED] wrote: Koenraad Lelong wrote: Marc Weustink schreef: Sam Liddicott wrote: I may be asking obvious questions here, but you didn't reveal a lot about your setup. Do you event have a DISPLAY environment variable set? Instead of setting your env, you can also start your app like: your_app --display=yourserver:0 Marc Tried this, and got another result. ./project1 --display=viper:0 gives : [FORMS.PP] ExceptionOccured Sender=EReadError Exception=Invalid Filer Signature Stack Trace: ... TApplication.HandleException Invalid Filer Signature Stack trace: ... then a form appears (with a red circle with a white bar in it) : Invalid Filer Signature Press OK to ingore and risk data corruption. Press Cancel to kill the program [ OK ] [ Cancel ] And the form seems to respond to a click on one of the buttons, it terminates the application. This is some progress, thanks. Other suggestions ? at leas this is no: Gtk-WARNING **: cannot open display: so you now have your display and ran into a complete different problem. Exception=Invalid Filer Signature: maybe some endian issue or a corrupt file or a bad compiled string constant (the form layout is stored internally in a string) does this viper run a big or little endian kernel? my vulcan is big endian and i can't get any joy out of it when i compile fpc with endian_big. it would be _very_ cool to be able to use lazarus with these little devices. henry _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Problem with lazreport
--- Swen Heinig [EMAIL PROTECTED] escribió: If a tiger appears you have a real problem. Then the Lazarus cheetah has run away. ;-) Currently it's not possible to use lazreport (and some other packages) with the win64 version of Lazarus. You can alternatively install the win32 version. Best regards, Swen IIRC, there was a problem in original win64 installer but Vincent already fixed, maybe it worths to try some recent snapshot or using lazarus from svn. At least I installed lazreport from cvs in Lazarus from svn and it worked fine. Jesus Reyes A. ¡Sé un mejor fotógrafo! Perfecciona tu técnica y encuentra las mejores fotos. http://mx.yahoo.com/promos/mejorfotografo.html _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Lazarus on Windows + Qt or GTK
Felipe Monteiro de Carvalho wrote: On 7/23/07, Tiziano_mk [EMAIL PROTECTED] wrote: It's only an idea, since I see I have the gtk2 libraries installed by Gimp on my Win XP partition, if I use the same widget maybe I have less troubles when I port it on the Ubuntu side of my PC. In that case it's probably better to just compile LCL. The Gtk 2 interface may require some work to compile under Windows. It should be mostly simple things, like ifdefing parts which require X11. afair I've ifdeffed all parts. So it should compile on windows. However, I didn't write replacement code for the X parts, so you should do it without keyboard support. Marc _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Linux/Printing Question
Hi all, This is quite a bit OT since the only thing related to Lazarus is that I will use to write the software. One of my company's main products does a lot of prep notifications to various printers on the network. For a single order (sale), prep instructions can be sent to up to 6 different printers. One of the things that has always been a problem with doing this kind of critical printing in windows has been the lack of status or way of querying printers (many are on print servers). I remember there was a way to send a fake print job and monitor using the Win32 API, but I had difficulty getting reliable printer status and it doesn't seem to work very well. Is this kind of printer monitoring possible in Linux? We are thinking about putting together a kind of Linux Appliance to do this and move the printing portion away from Windows, assuming printer status is obtainable on Linux like outlined above. Thanks for input. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives