Re: [Lazarus] IDE idea
On Sun, 2 Nov 2008, Mac Programmer wrote: I've been working recently with QGIS (www.qgis.org), a slick, cross- platform, Qt-based GIS. QGIS has a feature that is so cool, you almost have to see it to appreciate it. But here's a brief description anyway: QGIS supports plugins written in Python. If you've developed a nifty plugin, all you have to do is zip up your files, post the .zip on your Web site, then supply your users with the URL of a simple .xml file (called a plugin repository). For example: plugins pyqgis_plugin name=MyPlug version=0.0.1 descriptionDescription goes here./description homepage/ file_namemyplug.zip/file_name author_nameMy Name/author_name download_urlhttp://my.web.site/myplug.zip/download_url /pyqgis_plugin /plugins When your user enters this URL in QGIS's Plugin Installer, it downloads the .zip file, unzips it in the .qgis folder in your home folder (~ or C:\Documents and Settings\username), and adds it to the list of available plugins that can be activated in QGIS. But wait, there's more. If you select a plugin in the list that is not installed, the button says Install Plugin. If it's already installed, the button says Reinstall Plugin (useful if you suspect that you've corrupted or deleted some of the plugin's files). And if a _newer_ version is available, the button says Upgrade Plugin. You can manually have it scan all the repositories you've entered or optionally let it scan all repositories automatically when QGIS starts up. If it finds a plugin that you have installed and there's a newer version available, this is listed at the top of the available plugins list and highlighted in bold. It seems as though something like this might be useful in the Lazarus IDE for listing, downloading, installing and updating available packages. For example, perhaps the Installed Packages dialog could be extended to include this kind of feature. Selecting a package from a list of available packages in a repository XML would download and unzip the package source files under ~/.lazarus, then proceed with compiling the .lpk file and re-compiling Lazarus to install the package. This would also be useful for keeping up to date automatically with the latest version of a package that you use. As it is now, the way in which packages are made available can be different for each package and keeping up with the latest package version requires manually checking each package site. This might also help package authors and porters to keep their package up to date. At any given point in time it seems as though half the packages for Lazarus are broken (won't compile). Maybe this would be a way of automatically testing which packages, say on CCR, are broken and alerting the authors. We are working on such a system, it's called fpmake and fppkg. FPC itself will be converted to this, Lazarus too. And, it's written in 100% Object Pascal. Michael. ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Problems linking with QT4
I have some problems with linking to the QT widgetset. Apparently the linker does not like my library, but I believe to have correctly followed the instructions on the wiki. Is there anything else I need to do (or forget)? ldconfig -p | grep libqt4intf gives: libqt4intf.so (libc6,x86-64) = /usr/local/lib/libqt4intf.so The output of the build process is: Linking ../lazarus /usr/bin/ld: skipping incompatible /usr/local/lib/libqt4intf.so when searching for -lqt4intf /usr/bin/ld: cannot find -lqt4intf lazarus.pp(122,1) Error: Error while linking /usr/bin/ld: skipping incompatible /usr/local/lib/libqt4intf.so when searching for -lqt4intf /usr/bin/ld: cannot find -lqt4intf Regards, Darius ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How to use new leakview package?
On Mon, Nov 3, 2008 at 3:00 PM, Graeme Geldenhuys [EMAIL PROTECTED] wrote: Hi, I just saw the new leakview package added to Lazarus trunk. How am I supposed to use it? This is what I have done. OK, I made some progress By enabling the heaptrc log via the environment variable, and then loading that log file into the 'leak view' dialog populates the treeview with information. $ export HEAPTRC=log=myheap.log $ ./tutoradmin.exe [ now load the myheap.log file ...] Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Problems linking with QT4
On Monday 03 November 2008 14:21, Darius Blaszyk wrote: I have some problems with linking to the QT widgetset. Apparently the linker does not like my library, but I believe to have correctly followed the instructions on the wiki. Is there anything else I need to do (or forget)? What bindings version ? If you downloaded 1.66 then you must have qt-4.4 installed and use lazarus svn = 17196 and set define USE_QT_44, otherwise it should work. ldconfig -p | grep libqt4intf gives: libqt4intf.so (libc6,x86-64) = /usr/local/lib/libqt4intf.so The output of the build process is: Linking ../lazarus /usr/bin/ld: skipping incompatible /usr/local/lib/libqt4intf.so when searching for -lqt4intf /usr/bin/ld: cannot find -lqt4intf lazarus.pp(122,1) Error: Error while linking /usr/bin/ld: skipping incompatible /usr/local/lib/libqt4intf.so when searching for -lqt4intf /usr/bin/ld: cannot find -lqt4intf Regards, Darius ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] questions regarding bi-directional ui design
ik wrote: For example, if TApplication.BidiMode (I have added support for it with the help of Paul) is set to bdRightToLeft, should every TControl and TMenu base compoents should be automatically be aligned to right or the developer must choose the direction regardless of TApplication.BidiMode ? On this specific point I would recommend as part of the BiDi implementation expanding the choices for basic alignment to include a new value that means automatically decide based on bd setting. Then, the logic would be to look at the BiDiMode to determine the alignment. This way all existing code should work as it always has. If a developer wanted to adapt his program to take BiDi into account he could just set the BiDiMode and change all the alignments that should respond to the new alignment value. Any controls that should not adapt can continue to set their own alignment independent of the BiDi mode. ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Impossible to debug with Lazarus IDE
Horacio Jamilis wrote: Vincent Snijders escribió: Graeme Geldenhuys schreef: On Fri, Oct 31, 2008 at 10:19 AM, Martin Schreiber [EMAIL PROTECTED] wrote: Correct. MSEide can not access property values. Fortunately prepending the property name with 'F' usual works because of the naming convention. That was a handy trick. I managed to debug my program in Lazarus IDE yesterday, using that method. Thanks. Calling a property getter function is dangerous because the function often does more than simply return the value. I do not think that matters much. Properties are a fundamental language feature in Object Pascal and are used often, so the debugger must support it. Plus the code you are debugging doesn't care what's happing in the Getter method, it is only concerned with the result returned. So if the result return is not what you expected in that code location, then debug the Getter method or step into the Getter method. This worked for Delphi and Kylix from the start. Well, it can become tricky. Suppose you try to debug something in the form creating and initial showing. If you inspect the MyForm.Handle, the handle gets created. Now, the handle is created at another point in the initialization sequence than at normal run time. This is a risk, the debugger user shoud be aware of, but viewing and setting property values must work in the debugger, as it does in Delphi. If you can give me a nice way to undo the case vincent described, I'll happily implement that. Note that Delphi doesn't handle this either. So evaluating properties can modify the state of the debugee. I am with Graeme in this! I also believe that the Object Pascal Internal Debugger is an important thing missing in this project, but I think I don´t have the skills to contribute on this :-( Thats one thing, but what is more important is a fully generated debug info. Without this info, a debugger can do nothing. At this moment properties cannot be evaluated using the stabs info. period. When using dwarf it can be possible, however we might need a extention to the dwarf spec to get complete support. (FYI, stabs and dwarf are the formats fpc uses to write debug info) Marc ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Impossible to debug with Lazarus IDE
On Mon, Nov 3, 2008 at 12:45 PM, Marc Weustink [EMAIL PROTECTED] wrote: Well, it can become tricky. Suppose you try to debug something in the form creating and initial showing. If you inspect the MyForm.Handle, the handle gets created. Now, the handle is created at another point in the initialization sequence than at normal run time. This is a risk, the debugger user shoud be aware of, but viewing and setting property values must work in the debugger, as it does in Delphi. If you can give me a nice way to undo the case vincent described, I'll happily implement that. Don't treat developers as idiots! Normally they know the pitfalls in doing potentially dangerous tasks. Usage of raw Pointers is another example. If they don't know how to use it correctly or the know pitfalls, they will learn quickly. ;-) You have many pitfalls with Edit and Continue as well, yet it's an option for developers to use in Visual Studio. Note that Delphi doesn't handle this either. So evaluating properties can modify the state of the debugee. Well, if it's good enough for Delphi to include property evaluation without the safety net of an undo - why can't it be good enough for FPC's debugger? For me it's an acceptable risk - like many other things. And the benefits outweigh the risks. BTW: Is there a custom written FPC debugger we can try out and test? Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Accessing a scanner
Hi! Has anyone experiences accessing a scanner with lazarus? Perhaps even cross-platform? I'm dreaming of embedding scanner-functionality in one of our programs. Any hint would be appreciated... regards Lukas -- -- software security networks Lukas Gradl fpc#ssn.at Eduard-Bodem-Gasse 9 A - 6020 Innsbruck Tel: +43-512-214040-0 Fax: +43-512-214040-21 -- ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Impossible to debug with Lazarus IDE
Marc Weustink wrote: This is a risk, the debugger user shoud be aware of, but viewing and setting property values must work in the debugger, as it does in Delphi. If you can give me a nice way to undo the case vincent described, I'll happily implement that. Note that Delphi doesn't handle this either. So evaluating properties can modify the state of the debugee. It is ok. Why should you warry about undo? One must understand what does it do. On the other hand if you really want to protect users we can invent an option to prevent evaluation of properties which has getter (if we can detect ofcource props with getters and props linked to fields). Or we can split evaluation process of such properties by 2 steps: ask to evaluate property and confirm that you really want to evaluate a property with getter which can change debugee state. In the other words - please implement this and we will try to find a way to protect users ;) Best regards, Paul Ishenin. ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Accessing a scanner
Am Montag, 3. November 2008 18:08:02 schrieb Lukas Gradl: Hi! Has anyone experiences accessing a scanner with lazarus? Perhaps even cross-platform? I'm dreaming of embedding scanner-functionality in one of our programs. Any hint would be appreciated... regards Lukas Crossplattform is difficult Windows uses Twain (http://home.tiscali.nl/guusscholten/Twain.html) Linux uses Sane ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Impossible to debug with Lazarus IDE
Marc Weustink pisze: Horacio Jamilis wrote: Vincent Snijders escribió: Graeme Geldenhuys schreef: On Fri, Oct 31, 2008 at 10:19 AM, Martin Schreiber [EMAIL PROTECTED] wrote: Correct. MSEide can not access property values. Fortunately prepending the property name with 'F' usual works because of the naming convention. That was a handy trick. I managed to debug my program in Lazarus IDE yesterday, using that method. Thanks. Calling a property getter function is dangerous because the function often does more than simply return the value. I do not think that matters much. Properties are a fundamental language feature in Object Pascal and are used often, so the debugger must support it. Plus the code you are debugging doesn't care what's happing in the Getter method, it is only concerned with the result returned. So if the result return is not what you expected in that code location, then debug the Getter method or step into the Getter method. This worked for Delphi and Kylix from the start. Well, it can become tricky. Suppose you try to debug something in the form creating and initial showing. If you inspect the MyForm.Handle, the handle gets created. Now, the handle is created at another point in the initialization sequence than at normal run time. This is a risk, the debugger user shoud be aware of, but viewing and setting property values must work in the debugger, as it does in Delphi. If you can give me a nice way to undo the case vincent described, I'll happily implement that. Note that Delphi doesn't handle this either. So evaluating properties can modify the state of the debugee. I am with Graeme in this! I also believe that the Object Pascal Internal Debugger is an important thing missing in this project, but I think I don´t have the skills to contribute on this :-( Thats one thing, but what is more important is a fully generated debug info. Without this info, a debugger can do nothing. At this moment properties cannot be evaluated using the stabs info. period. When using dwarf it can be possible, however we might need a extention to the dwarf spec to get complete support. (FYI, stabs and dwarf are the formats fpc uses to write debug info) Marc Isn't dwarf already implemented in fpc SVN version ? Boguslaw ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] How to use new leakview package?
Hi, I just saw the new leakview package added to Lazarus trunk. How am I supposed to use it? This is what I have done. * I saw the new leakview menu item under the Tools menu. * The leakview dialog seems to require some file as input. * I then recompiled my project with the heaptrc unit enabled. * Ran my program as follow to output memory leaks (yes I have a few unfixed). ;-) tutoradmin log.trc 21 * I then loaded the log.trc file in the leakview dialog and clicked Update button . Nothing Happened .. Anybody that can give some help here? Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] FW: Default caption in MessageDlg()
Henrique Faria schreef: I cannot find the exact reason for the change. I have no objection to revert it. Vincent Since I had nothing better to do I submitted a patch in the bugtracker. Bart The possibility to edit the caption in a messagedlg can help on internationalization matter. Is there a better way to change the buttons instead of editing the lclstrconsts.pas ? See previous answer: http://www.lazarus.freepascal.org/pipermail/lazarus/2008-November/020856.html Vincent ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Proposal for CreateMessageDialog() function
Hi, Currently Lazarus has no CreateMessagedialog function, whereas Delphi has. function CreateMessageDialog(const Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons): TForm; This function returns the actual form of the messagedialog, and so gives the programmer access to all the controls on this dialog form. In Delphi 3 I used this to access the captions of the buttons and do an on the fly translation. Given that we Lazarus can use .po files to translae the resourcestrings for the captions, this is not necessary anymore. However, another use of this function is to add controls to the dialog form, thus creating customized message dialog variants. One example of this is adding a checkbox with a caption like Don't show this dialog again, which is quit useful. (See http://i25.photobucket.com/albums/c74/Talent111/devel/messagedlg_with_checkbox.png for an example of this) A long time ago I posted bugreport #0008186 on Mantis (Feature request: make it possible to add controls to MessageDlg()). At that time I was new to Lazarus, and saw no opportunity to accomplish the task myself. Lately however, browsing dialogs.pp (more specifically promptdialog.inc), I noticed that most of the work was already done. So my proposal is like this: Declare CreateMessageDialog in the interface of dialogs.pp. Adjust promptdialog.inc more or less like this: function CreateMessageDialog(const Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons): TForm; var PDlg: TPromptDialog; aCaption: String; Btns: PLongInt; CancelValue, DefaultIndex, ButtonCount: Longint; UseDefButton: Boolean; DefButton: TMsgDlgBtn; begin if DlgType mtCustom then aCaption := MsgDlgCaptions[DlgType] else aCaption := Application.Title; UseDefButton := False; Btns := GetPromptUserButtons(Buttons, CancelValue, DefaultIndex, ButtonCount, UseDefButton, DefButton); DebugLn('CancelValue = ',ModalResToStr(CancelValue)); PDlg := TPromptDialog.CreateMessageDialog(aCaption, Msg, DialogIds[DlgType], Btns, ButtonCount, DefaultIndex); Result := TForm(PDlg); //??? Is this save to do ReallocMem(Btns, 0); end; A tipical use of this function would the be like: procedure TForm1.ShowBtnClick(Sender: TObject); var Dlg: TForm; Res: TModalResult; DT: TMsgDlgType; Title,Msg: String; Btns: TMsgDlgButtons; i: Integer; begin Title := TitleEdit.Text; Msg := MsgMemo.Text; case DTGroup.ItemIndex of 0: DT := mtCustom; 1: DT := mtError; 2: DT := mtWarning; 3: DT := mtInformation; 4: DT := mtConfirmation; end; Btns := [mbYes, mbNo, mbOK, mbCancel, mbAbort, mbRetry, mbIgnore, mbAll, mbNoToAll, mbYesToAll, mbHelp, mbClose]; Dlg := CreateMessageDialog(Msg,DT, Btns); ... DoSomethingWithTheDialogForm; //Add a checkbox for example ... try Res := Dlg.ShowModal; Finally Dlg.Free; end; end; Users should be aware that a Modalresult of -1 means that the Escape key was pressed. I'd really appreciate your suggestions and ideas on this one, especially on the Is this safe to do remark in my code. Bart ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] mailing list
check your spam settings? at least I can read your message here:) 2008/11/4 Henrique Faria [EMAIL PROTECTED]: Why i can't receive emails from the mailing list? I try to subscribe and nothing happens. :( Henrique. Veja mapas e encontre as melhores rotas para fugir do trânsito com o Live Search Maps! Experimente já! ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus