Re: [Lazarus] Commenting.
2011/4/2 Martin laza...@mfriebe.de: Now, supported in the latest svn. Folded code stays folded. However as long as a fold is in a comment (or otherwise preserved where it would have previously been unfolded), it will not be saved to your session. That means: - if you restart the IDE, while you have an unfinished (* comment = you lose the folds inside that comment. - Once you finished the comment, all folds after the *) will be normal again, and be preserved. Oh, and if you go for it. Remember it's a snapshot, it's a new feature, it had some testing here, but you should save your data regulary. Martin Hi Martin, Thank you! I updated svn to Lazarus 0.9.30 r30142M FPC 2.4.2 i386-win32-win32/win64 but trying with both { OR (* folded code after first open parenthesis unfolds when I start the comment :( Kjow -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] MDI implementation
Quoting Daniel Franzini daniel.franz...@gmail.com: Hi there. I'm trying to write a MDI application in Lazarus (Win32/Vista, Lazarus 0.9.31). MDI isn't yet supported on lazarus, but will be available soon. You can see progres at my todo list. http://wiki.lazarus.freepascal.org/User:Zeljan There are also some mdi screenshoots. zeljko -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] UniqueInstance issue
Luiz Americo Pereira Camara ha scritto: On 2/4/2011 15:18, Giuliano Colla wrote: In an application I'm currently developing, meant to run under RHEL5, I needed to ensure that no multiple instances were running, so I installed the UniqueInstance component: http://sourceforge.net/projects/lazarus-ccr/files/Unique%20Instance/Unique%20Instance%200.2/ please publish a sample project and a stacktrace To avoid attachment length problems, my zipped sandbox folder is available at: http://www.copeca.it/colla/Sandbox.zip where you can find project1 and project2, to help sort out the problems, together with Trace1.txt and Trace2.txt, which are the stack traces for project1 and project2. Project1 is nothing but a form with only a TUniqueInstance component. If the component is enabled at design time, it works perfectly. If the component is not enabled at design time, see Trace1.txt. (stack trace of the first and only instance running) In Project2 I tried to put in one by one all the components of my real application. Apparently the problem arises with the TMemo component, whose presence, together with TUniqueInstance, triggers the access violation (see Trace2.txt, which is the trace of the second instance running). A TMemo issue or a TUiniqueInstance issue? Kind regards, Giuliano -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] UniqueInstance issue
Giuliano Colla ha scritto: Luiz Americo Pereira Camara ha scritto: On 2/4/2011 15:18, Giuliano Colla wrote: In an application I'm currently developing, meant to run under RHEL5, I needed to ensure that no multiple instances were running, so I installed the UniqueInstance component: http://sourceforge.net/projects/lazarus-ccr/files/Unique%20Instance/Unique%20Instance%200.2/ please publish a sample project and a stacktrace For sake of completeness, I tested with gtk1 in a different platform (but with same Lazarus and fpc versions). No difference. Giuliano -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Project / Save Project As ... - expected behavior?
John Repucci schrieb: Is either of these procedures (move one file at a time or edit the lpi file) the way this should ideally work? I was expecting that Save Project As ... would allow me to clone the project so I could start a spin-off. Would Project / Publish Project do a clone? For cloning etc. IMO the project directory should be moved or copied, outside the IDE. Is there any reason I should not create an enhancement / feature request to change this behavior? The feature (as is) supports to move or duplicate project files, e.g. when you want multiple versions of the same project (package...). In this case the file references in the project file have to be updated, and this is what this feature does for the user. Similarly the project file is updated when one of the project units is Save'd As. Moving around entire projects, e.g. for backup purposes, does not normally require changes to the project file, so that this can and should be done outside the IDE. DoDi -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus config woes
Mattias Gaertner schrieb: Where can I find the documentation for the templates? There is not much to know: The secondary have obviously the same format as the primary configs. The values depends on version. They are human readable xml and you should not edit them manually. Use the IDE to create/edit them. Sorry, there remains much more to know :-( Why, or in how far, do template values depend on a version? There is only one value per key. No version. It's obvious that the *amount* of entries can differ, but what about installation specific entries (pathes...)? For example the debian package puts configs into /etc/lazarus to setup Lazarus directory, compile file name, make path, gdb and help files. The Windows installer puts essentially the same informations into the Lazarus directory. But these configs are very rudimentary, from which place are the remaining settings taken? How can the IDE be used to create or edit templates? (so that nothing but the template is affected) Just copy a config to the scp and strip all values from the xml you don't need. This is against the wiki suggestion, therefore my question. Which xml do you mean? The environmentoptions.xml only, or other config files as well? Which macros can be used in a template? (absolute path issue) The same as in the config files. See http://wiki.lazarus.freepascal.org/IDE_Macros_in_paths_and_filenames#Paths_and_Parts This should be mentioned in the wiki as well. DoDi -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus config woes
Mattias Gaertner schrieb: BTW, my experiments indicate that putting an environmentoptions.xml into the Lazarus directory (scp) will make the IDE use these settings, but only if there exists no config in the default location. The full config then is written back to the *default* location (pcp), not into the Lazarus directory. Yes, that's what I meant with used as template. Okay, that explains a lot :-) Remains to mention that the template term has to be explained to the user. Normally a template is used to create *different* versions (installations) from it, but Lazarus - by default - does it the opposite way: templates are taken from an *installation*, and the result is put into a *common* place. It seems to me you misunderstood. It is taken from the installation (e.g. under Linux the scp is /etc/lazarus). The Windows installer puts the files into the Lazarus directory, which can be a system wide directory, not writable for the user. And put into a user specific place. Under Linux this is ~/.lazarus, under Windows it is GetAppConfigDir(False). Exactly as I wrote: a new installation copies its config files (templates) from the Lazarus directory into the common config directory. I accept the argument, that the Lazarus directory may be write protected, so that the new config may have to be stored in user-land. And I accept that typical installs of new versions, of the same application, should update the common application config. But this IMO is what an *installer* should do, the IDE itself should behave differently, to better support *multiple* installations. In fact the Windows installer creates a rudimentary environmentoptions.xml, that only contains the absolute references to the applications (fpc, make) that come with the installation. The behaviour on Linux may be different, AFAIK Linux installations don't include their own FPC and tools. We still seem to differ in the meaning of template. You mean installation-specific settings, like the pathes to the tools that came with a new installation. Instead I mean all the other settings, which the user has used before (e.g. language, window positions...). Unfortunately both sets of settings are stored in the same file, environmentoptions.xml, so that *all* user-specific settings in that file are lost, when a new config is created by the IDE in the given -pcp :-( This behaviour makes sense only because -pcp overwrites the *common* place, so that effectively *no* place exists where common (installation-independent) templates or settings can be stored :-( Your information is outdated. No, my tests are based on both 0.9.30 release and trunk. Please take a look at ide/include/win/lazbaseconf.inc. You can see that only for fpc 2.2.0 the scp was the same as the pcp. You better test the real behaviour of the IDE, as I did. Then you may understand better what I wrote. [...] Why does the IDE store an updated config *always* in the default directory, instead in the same directory from which (parts of) the config have been loaded before? If you want that you can set pcp and scp to the same directory. That's not a solution of the problem, because then still no place exists, where defaults could be stored - they are overwritten when pcp=scp :-( I can't follow you here. Maybe you are talking about a different kind of defaults? The purpose of the scp is to provide defaults for the first start of the IDE. See above. The current contents of a template are the *installation-specific* pathes, that apply to a concrete installation. In so far it makes sense to copy *these* values from the scp, i.e. from the Lazarus directory. But then we should have another kind of templates, that contain all the remaining settings, AKA *user preferences*. Perhaps you'll better understand my point when you try to configure a new SVN checkout, based on the current user-specific settings. How can this be accomplished? In a more perfect world we would have: - user config path (ucp, my templates, default: common config place) - installation config path (scp, your templates, default: LazDir) - primary config path (pcp, as is, default: [SVN] working copy) DoDi -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Commenting.
On 03/04/2011 10:07, Kjow wrote: 2011/4/2 Martinlaza...@mfriebe.de: Now, supported in the latest svn. Folded code stays folded. However as long as a fold is in a comment (or otherwise preserved where it would have previously been unfolded), it will not be saved to your session. That means: - if you restart the IDE, while you have an unfinished (* comment = you lose the folds inside that comment. - Once you finished the comment, all folds after the *) will be normal again, and be preserved. Oh, and if you go for it. Remember it's a snapshot, it's a new feature, it had some testing here, but you should save your data regulary. Martin Hi Martin, Thank you! I updated svn to Lazarus 0.9.30 r30142M FPC 2.4.2 i386-win32-win32/win64 but trying with both { OR (* folded code after first open parenthesis unfolds when I start the comment :( it is *not* in 0.9.30 It is only in 0.9.31 http://www.hu.freepascal.org/lazarus/ (links *without fixes e.g. Lazarus + fpc 2.4.2 win32 Lazarus-0.9.31-30142-fpc-2.4.2-20110403-win32.exe ftp://ftp.hu.freepascal.org/pub/lazarus/snapshots/Lazarus-0.9.31-30142-fpc-2.4.2-20110403-win32.exe The 64 bit snapshot seems missing at current. as for 32 bit: 0.9.31 snapshots with 30142 should be good 30141 is ok, but as long as the fold is commented the [+] symbol is not reacting to clicks if you want to stay on 0.9.30, then you can just merge 2 revisions 30141 and 30142 (and 30140 for 64 bit) I attached a patch, (there is one for each of the revisions, so depending on what you download, you apply the rest) Or you hope that tomorrow there will be a 64 bit snapshot too Martin syn_fold_comment_patch.rar Description: Binary data -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] MDI implementation
Thank you, Peter. I already tried in Delphi and it works fine. I wanted to do this in Lazarus because I intended it to work in Linux too. But thanks anyway for the tip and the code. 2011/4/2 Peter Williams pewilliams2...@live.com Hi Daniel, -- Date: Sat, 2 Apr 2011 19:02:46 -0300 From: daniel.franz...@gmail.com To: lazarus@lists.lazarus.freepascal.org Subject: [Lazarus] MDI implementation Hi there. I'm trying to write a MDI application in Lazarus (Win32/Vista, Lazarus 0.9.31). I created the main form and set its FormStyle property to fsMDIForm. Then I created the child form and set its FormsStyle to fsMDIChild. I also created a menu where I can start a new form. I moved the child form the non-automatic-created form list. And used the following code to create it: - procedure TfrmMain.mnuEntrarDadosClick(Sender: TObject); var frmChild: TfrmRelatVend; begin frmChild := TfrmRelatVend.Create(self); frmChild.Show; end; - I also wrote a formClose handler for the child so it gets freed when I close it. - procedure TfrmRelatVend.FormClose(Sender: TObject; var CloseAction: TCloseAction); begin CloseAction := caFree; end; - Altough the form gets created and shows up, it does not have a MDI behavior, eg, it does not stay in the limits of its parent form and it gets maximized on top of its parent form. What am I doing wrong? thank you I cannot tell you exactly what you're doing wrong, but I can do the next best thing. I have a Simple_Ed (simple text editor) which supports unlimited MDI child text windows working. You can find it here: https://sites.google.com/site/pewtas/home/delphi_source_code https://sites.google.com/site/pewtas/home/delphi_source_codeand the download for the Delphi 7 source code is here: simple_ed_005_src.zip https://sites.google.com/site/pewtas/simple_ed_005_src.zip?attredirects=019 KB - The Delphi source code files only (Note that this has a main form and a child MDI form). Best Regards, Peter / pew -- Daniel Let us change our traditional attitude to the construction of programs. Instead of imagining that our main task is to instruct a computer what to do, let us concentrate rather on explaining to human beings what we want a computer to do. (Donald Knuth) Yes, technogeeks can be funny, even if only to each other. ( http://www.boogieonline.com/revolution/science/humor/) Man is driven to create; I know I really love to create things. And while I'm not good at painting, drawing, or music, I can write software. (Yukihiro Matsumoto, a.k.a. ``Matz'') -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- Daniel Let us change our traditional attitude to the construction of programs. Instead of imagining that our main task is to instruct a computer what to do, let us concentrate rather on explaining to human beings what we want a computer to do. (Donald Knuth) Yes, technogeeks can be funny, even if only to each other. ( http://www.boogieonline.com/revolution/science/humor/) Man is driven to create; I know I really love to create things. And while I'm not good at painting, drawing, or music, I can write software. (Yukihiro Matsumoto, a.k.a. ``Matz'') -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] block completion for classes
Hello together! Since some revisions I have noticed that Lazarus does not complete a class declaration anymore. E.g.: TTest = class| pressing Enter previously resulted in this: TTest = class | end; Was a config option changed/added for this or is this a bug? Information: rev. 30150; linux-i386-gtk2 Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] MDI implementation
Hi Daniel, Date: Sun, 3 Apr 2011 10:28:07 -0300 From: daniel.franz...@gmail.com To: lazarus@lists.lazarus.freepascal.org Subject: Re: [Lazarus] MDI implementation Thank you, Peter. I already tried in Delphi and it works fine. I wanted to do this in Lazarus because I intended it to work in Linux too. But thanks anyway for the tip and the code. I found that my Delphi code does not compile in Lazarus for MDI forms. http://wiki.lazarus.freepascal.org/MultiDoc MultiDoc is the Lazarus version of MDI forms. http://sourceforge.net/projects/lazarus-ccr/files/MultiDoc/MultiDoc%200.2/multidoc-0.2.zip/download I installed it and ran the demo and found that when I have some child forms, when I close one of the forms I get an EAccess violation error (216) exception. Does anyone know how we can get rid of this AV error ??? Note the component is dated 2007-01-06 and version 0.2. Best Regards,Peter / pew 2011/4/2 Peter Williams pewilliams2...@live.com Hi Daniel, Date: Sat, 2 Apr 2011 19:02:46 -0300 From: daniel.franz...@gmail.com To: lazarus@lists.lazarus.freepascal.org Subject: [Lazarus] MDI implementation Hi there. I'm trying to write a MDI application in Lazarus (Win32/Vista, Lazarus 0.9.31). I created the main form and set its FormStyle property to fsMDIForm. Then I created the child form and set its FormsStyle to fsMDIChild. I also created a menu where I can start a new form. I moved the child form the non-automatic-created form list. And used the following code to create it: - procedure TfrmMain.mnuEntrarDadosClick(Sender: TObject); var frmChild: TfrmRelatVend; begin frmChild := TfrmRelatVend.Create(self); frmChild.Show; end; - I also wrote a formClose handler for the child so it gets freed when I close it. - procedure TfrmRelatVend.FormClose(Sender: TObject; var CloseAction: TCloseAction); begin CloseAction := caFree; end; - Altough the form gets created and shows up, it does not have a MDI behavior, eg, it does not stay in the limits of its parent form and it gets maximized on top of its parent form. What am I doing wrong? thank you I cannot tell you exactly what you're doing wrong, but I can do the next best thing. I have a Simple_Ed (simple text editor) which supports unlimited MDI child text windows working. You can find it here: https://sites.google.com/site/pewtas/home/delphi_source_code and the download for the Delphi 7 source code is here: simple_ed_005_src.zip 19 KB - The Delphi source code files only (Note that this has a main form and a child MDI form). Best Regards,Peter / pew -- Daniel Let us change our traditional attitude to the construction of programs. Instead of imagining that our main task is to instruct a computer what to do, let us concentrate rather on explaining to human beings what we want a computer to do. (Donald Knuth) Yes, technogeeks can be funny, even if only to each other. (http://www.boogieonline.com/revolution/science/humor/) Man is driven to create; I know I really love to create things. And while I'm not good at painting, drawing, or music, I can write software. (Yukihiro Matsumoto, a.k.a. ``Matz'') -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- Daniel Let us change our traditional attitude to the construction of programs. Instead of imagining that our main task is to instruct a computer what to do, let us concentrate rather on explaining to human beings what we want a computer to do. (Donald Knuth) Yes, technogeeks can be funny, even if only to each other. (http://www.boogieonline.com/revolution/science/humor/) Man is driven to create; I know I really love to create things. And while I'm not good at painting, drawing, or music, I can write software. (Yukihiro Matsumoto, a.k.a. ``Matz'') -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] block completion for classes
On 3 April 2011 17:12, Sven Barth pascaldragon@ wrote: pressing Enter previously resulted in this: TTest = class | end; Was a config option changed/added for this or is this a bug? Isn't that just defined in Code Templates - something the developer can change themselves? I'm using 0.9.30 and that code template / class completion works as you described above. -- Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] block completion for classes
On 03.04.2011 18:59, Graeme Geldenhuys wrote: On 3 April 2011 17:12, Sven Barthpascaldragon@ wrote: pressing Enter previously resulted in this: TTest = class | end; Was a config option changed/added for this or is this a bug? Isn't that just defined in Code Templates - something the developer can change themselves? I don't think so, because it worked for TTest = class(TFoo)| as well. You can't do that with code templates (as far as I know). I'm using 0.9.30 and that code template / class completion works as you described above. I just tested it with 0.9.30 as well. And indeed: it works there. So this seems to be a bug/regression (if I haven't missed a setting of course). Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Application.Handle
Hi Can Application.Handle be ported to Lazarus as Application.MainFormHandle? It is use for a plugin system: APlugin.Initialize(Application.Handle); Juha -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] MDI implementation
Hi Peter. I found this version to be newer. http://www.oocities.org/br/hipernetjr/lmdi/index_en.html It seems to work well, but needs further testing. 2011/4/3 Peter Williams pewilliams2...@live.com Hi Daniel, -- Date: Sun, 3 Apr 2011 10:28:07 -0300 From: daniel.franz...@gmail.com To: lazarus@lists.lazarus.freepascal.org Subject: Re: [Lazarus] MDI implementation Thank you, Peter. I already tried in Delphi and it works fine. I wanted to do this in Lazarus because I intended it to work in Linux too. But thanks anyway for the tip and the code. I found that my Delphi code does not compile in Lazarus for MDI forms. http://wiki.lazarus.freepascal.org/MultiDoc MultiDoc is the Lazarus version of MDI forms. http://sourceforge.net/projects/lazarus-ccr/files/MultiDoc/MultiDoc%200.2/multidoc-0.2.zip/download I installed it and ran the demo and found that when I have some child forms, when I close one of the forms I get an EAccess violation error (216) exception. Does anyone know how we can get rid of this AV error ??? Note the component is dated 2007-01-06 and version 0.2. Best Regards, Peter / pew 2011/4/2 Peter Williams pewilliams2...@live.com Hi Daniel, -- Date: Sat, 2 Apr 2011 19:02:46 -0300 From: daniel.franz...@gmail.com To: lazarus@lists.lazarus.freepascal.org Subject: [Lazarus] MDI implementation Hi there. I'm trying to write a MDI application in Lazarus (Win32/Vista, Lazarus 0.9.31). I created the main form and set its FormStyle property to fsMDIForm. Then I created the child form and set its FormsStyle to fsMDIChild. I also created a menu where I can start a new form. I moved the child form the non-automatic-created form list. And used the following code to create it: - procedure TfrmMain.mnuEntrarDadosClick(Sender: TObject); var frmChild: TfrmRelatVend; begin frmChild := TfrmRelatVend.Create(self); frmChild.Show; end; - I also wrote a formClose handler for the child so it gets freed when I close it. - procedure TfrmRelatVend.FormClose(Sender: TObject; var CloseAction: TCloseAction); begin CloseAction := caFree; end; - Altough the form gets created and shows up, it does not have a MDI behavior, eg, it does not stay in the limits of its parent form and it gets maximized on top of its parent form. What am I doing wrong? thank you I cannot tell you exactly what you're doing wrong, but I can do the next best thing. I have a Simple_Ed (simple text editor) which supports unlimited MDI child text windows working. You can find it here: https://sites.google.com/site/pewtas/home/delphi_source_code https://sites.google.com/site/pewtas/home/delphi_source_codeand the download for the Delphi 7 source code is here: simple_ed_005_src.zip https://sites.google.com/site/pewtas/simple_ed_005_src.zip?attredirects=019 KB - The Delphi source code files only (Note that this has a main form and a child MDI form). Best Regards, Peter / pew -- Daniel Let us change our traditional attitude to the construction of programs. Instead of imagining that our main task is to instruct a computer what to do, let us concentrate rather on explaining to human beings what we want a computer to do. (Donald Knuth) Yes, technogeeks can be funny, even if only to each other. ( http://www.boogieonline.com/revolution/science/humor/) Man is driven to create; I know I really love to create things. And while I'm not good at painting, drawing, or music, I can write software. (Yukihiro Matsumoto, a.k.a. ``Matz'') -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- Daniel Let us change our traditional attitude to the construction of programs. Instead of imagining that our main task is to instruct a computer what to do, let us concentrate rather on explaining to human beings what we want a computer to do. (Donald Knuth) Yes, technogeeks can be funny, even if only to each other. ( http://www.boogieonline.com/revolution/science/humor/) Man is driven to create; I know I really love to create things. And while I'm not good at painting, drawing, or music, I can write software. (Yukihiro Matsumoto, a.k.a. ``Matz'') -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- Daniel Let us change our
Re: [Lazarus] Application.Handle
04.04.2011 0:06, Juha (gmail) wrote: Can Application.Handle be ported to Lazarus as Application.MainFormHandle? It is use for a plugin system: APlugin.Initialize(Application.Handle); Depends on your plugin needs. But I don't think so because they are different handles. better use: APlugin.Initialize(WidgetSet.AppHandle)' Best regards, Paul Ishenin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] MDI implementation
Hi Daniel, I am getting now an error with the new version. I try to install it and it comes back with cannot find package LMDI (or possibly graph). Best Regards,Peter / pew Date: Sun, 3 Apr 2011 14:17:18 -0300 From: daniel.franz...@gmail.com To: lazarus@lists.lazarus.freepascal.org Subject: Re: [Lazarus] MDI implementation Hi Peter. I found this version to be newer. http://www.oocities.org/br/hipernetjr/lmdi/index_en.html It seems to work well, but needs further testing. 2011/4/3 Peter Williams pewilliams2...@live.com Hi Daniel, Date: Sun, 3 Apr 2011 10:28:07 -0300 From: daniel.franz...@gmail.com To: lazarus@lists.lazarus.freepascal.org Subject: Re: [Lazarus] MDI implementation Thank you, Peter. I already tried in Delphi and it works fine. I wanted to do this in Lazarus because I intended it to work in Linux too. But thanks anyway for the tip and the code. I found that my Delphi code does not compile in Lazarus for MDI forms. http://wiki.lazarus.freepascal.org/MultiDoc MultiDoc is the Lazarus version of MDI forms. http://sourceforge.net/projects/lazarus-ccr/files/MultiDoc/MultiDoc%200.2/multidoc-0.2.zip/download I installed it and ran the demo and found that when I have some child forms, when I close one of the forms I get an EAccess violation error (216) exception. Does anyone know how we can get rid of this AV error ??? Note the component is dated 2007-01-06 and version 0.2. Best Regards,Peter / pew 2011/4/2 Peter Williams pewilliams2...@live.com Hi Daniel, Date: Sat, 2 Apr 2011 19:02:46 -0300 From: daniel.franz...@gmail.com To: lazarus@lists.lazarus.freepascal.org Subject: [Lazarus] MDI implementation Hi there. I'm trying to write a MDI application in Lazarus (Win32/Vista, Lazarus 0.9.31). I created the main form and set its FormStyle property to fsMDIForm. Then I created the child form and set its FormsStyle to fsMDIChild. I also created a menu where I can start a new form. I moved the child form the non-automatic-created form list. And used the following code to create it: - procedure TfrmMain.mnuEntrarDadosClick(Sender: TObject); var frmChild: TfrmRelatVend; begin frmChild := TfrmRelatVend.Create(self); frmChild.Show; end; - I also wrote a formClose handler for the child so it gets freed when I close it. - procedure TfrmRelatVend.FormClose(Sender: TObject; var CloseAction: TCloseAction); begin CloseAction := caFree; end; - Altough the form gets created and shows up, it does not have a MDI behavior, eg, it does not stay in the limits of its parent form and it gets maximized on top of its parent form. What am I doing wrong? thank you I cannot tell you exactly what you're doing wrong, but I can do the next best thing. I have a Simple_Ed (simple text editor) which supports unlimited MDI child text windows working. You can find it here: https://sites.google.com/site/pewtas/home/delphi_source_code and the download for the Delphi 7 source code is here: simple_ed_005_src.zip 19 KB - The Delphi source code files only (Note that this has a main form and a child MDI form). Best Regards,Peter / pew -- Daniel Let us change our traditional attitude to the construction of programs. Instead of imagining that our main task is to instruct a computer what to do, let us concentrate rather on explaining to human beings what we want a computer to do. (Donald Knuth) Yes, technogeeks can be funny, even if only to each other. (http://www.boogieonline.com/revolution/science/humor/) Man is driven to create; I know I really love to create things. And while I'm not good at painting, drawing, or music, I can write software. (Yukihiro Matsumoto, a.k.a. ``Matz'') -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- Daniel Let us change our traditional attitude to the construction of programs. Instead of imagining that our main task is to instruct a computer what to do, let us concentrate rather on explaining to human beings what we want a computer to do. (Donald Knuth) Yes, technogeeks can be funny, even if only to each other. (http://www.boogieonline.com/revolution/science/humor/) Man is driven to create; I know I really love to create things. And while I'm not good at painting, drawing, or music, I can write software. (Yukihiro Matsumoto, a.k.a. ``Matz'') -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___