RE: [fpc-pascal] ANN: wxForms for Delphi - wxWidgets designer and wrapper for Delphi/Freepascal
Hi, You are right, I didn't mention the exact version. When I started testing 8 months ago I think the main release was not working for couple of feature I have in wxForms. That's the reason I was suggesting users to use the daily build. With the recent release of Lazarus I think that problem would have been fixed. I'll update the site after I test new versions. -regards, Guru > -Original Message- > From: fpc-pascal-boun...@lists.freepascal.org [mailto:fpc-pascal- > boun...@lists.freepascal.org] On Behalf Of Graeme Geldenhuys > Sent: Thursday, April 02, 2009 12:13 AM > To: FPC-Pascal users discussions > Subject: Re: [fpc-pascal] ANN: wxForms for Delphi - wxWidgets designer and > wrapper for Delphi/Freepascal > > 2009/4/2 Guru Kathiresan : > > > > Today I have released a new product for Delphi and Freepascal - wxForms > for > > Delphi. > > > > Congratulations on your release. It's always nice to see people > embrace Free Pascal. One question and something you don't mention on > your website (well I couldn't find it). > > For which version of FPC is wxForms for Mac? I guess it will only > work with a "release" version of FPC and not the FPC "fixes" branch, > otherwise the PPU files will constantly be broken... Correct? > > This is something that is much easier under Delphi, because CodeGear > doesn't release that many versions that often. FPC, especially the > fixes branch things change more frequent. > > > Regards, > - Graeme - > > > ___ > fpGUI - a cross-platform Free Pascal GUI toolkit > http://opensoft.homeip.net/fpgui/ > ___ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > http://lists.freepascal.org/mailman/listinfo/fpc-pascal ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
RE: [fpc-pascal] ANN: wxForms for Delphi - wxWidgets designer andwrapper for Delphi/Freepascal
Hi helmut, Thanks for your advice. I'll make changes to site content to reflect Freepascal support. -regards, Guru Kathiresan > -Original Message- > From: fpc-pascal-boun...@lists.freepascal.org [mailto:fpc-pascal- > boun...@lists.freepascal.org] On Behalf Of Helmut Hartl > Sent: Thursday, April 02, 2009 12:21 AM > To: fpc-pascal@lists.freepascal.org > Subject: AW: [fpc-pascal] ANN: wxForms for Delphi - wxWidgets designer > andwrapper for Delphi/Freepascal > > Von: Guru Kathiresan > Gesendet: Do 02.04.2009 08:46 > An: fpc-pascal@lists.freepascal.org; > Betreff: [fpc-pascal] ANN: wxForms for Delphi - wxWidgets designer and > wrapper for Delphi/Freepascal > > > Hello, > > > > Today I have released a new product for Delphi and Freepascal - wxForms > for > > Delphi . > > This is a Pascal wrapper for wxWidgets and a Form designer for Delphi . > > For more Information, Please visit http://www.twinforms.com . > > congrats! > > to deliver some "marketing" input: > > after looking at the website i did not immediatley see something about > freepascal support :-( > > Cite > > "wxForms for Delphi is an integrated wxWidgets form designer for CodeGear > Delphi that helps create cross platform applications for Windows and Mac > OSX using single source base." > > on the front page gives me the impression that i can use Delphi to create > mac osx apps ? > - the faq's make that a bit clearer. > > but if i were a possible (fpc) customer i would be more happy if see > (quicker) that i can use your > product with fpc. > > helmut > ___ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > http://lists.freepascal.org/mailman/listinfo/fpc-pascal ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
RE: [fpc-pascal] ANN: wxForms for Delphi - wxWidgets designer andwrapper for Delphi/Freepascal
Hi, I think that is possible. I'll investigate it further. -regards, Guru Kathiresan > -Original Message- > From: fpc-pascal-boun...@lists.freepascal.org [mailto:fpc-pascal- > boun...@lists.freepascal.org] On Behalf Of Paul Ishenin > Sent: Thursday, April 02, 2009 6:22 AM > To: FPC-Pascal users discussions > Subject: Re: [fpc-pascal] ANN: wxForms for Delphi - wxWidgets designer > andwrapper for Delphi/Freepascal > > Guru Kathiresan wrote: > > > > Hello, > > > > Today I have released a new product for Delphi and Freepascal - > > wxForms for Delphi. > > > > This is a Pascal wrapper for wxWidgets and a Form designer for Delphi. > > > > And what about design forms in Lazarus? > > Best regards, > Paul Ishenin. > ___ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > http://lists.freepascal.org/mailman/listinfo/fpc-pascal ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Constructors & Destructors 101
I am a little bit unclear about certain things on class constructors and destructors. From what I read in the language reference guide (chapter 6) and runtime utilities document (chapter 29): 1) All classes descend from TObject; even declaring a new class without using TObject as a qualifier. 2) TObject.Create is static (not declared virtual) 3) TObject.Destroy is declared virtual 4) Under most circumstances one should call the Free method to release an object since it checks for a nil pointer first. This method then calls the destructor (Destroy) which, after executing your own clean up code if any, will then release the memory. However, the object memory reference will not be set to nil. Testing this out confirms this and the variable will still contain the memory address of the previously allocated memory block even though the memory block pointed to by the variable is not usable for anything. To ensure that the address is set to nil, one should call the "global" sysutil function FreeAndNil , (chapter 30 RTL doc). This routine sets the address to nil before calling the free method which then calls the destructor. 5) Although I can't remember reading it anywhere, I've noticed from my own demo programs that the addresses of objects are initially set to nil. If I have all of the above correct, then I have the following questions: A) The documentation says that for the create constructor: (quote} Description: Create creates a new instance of TObject. Currently it does nothing. It is also not virtual, so there is in principle no need to call it directly. {unquote} What is it meant by: "no need to call [create] directly?" How do you invoke the constructor without calling it? ... and ... Why is create not virtual and the destroy destructor is? B) The documentation says that for the destroy destructor: (quote} Description: Destroy is the destructor of TObject. It will clean up the memory assigned to the instance. Descendent classes should override destroy if they want to do additional clean-up. No other destructor should be implemented. {unquote} What is it meant by: "No other destructor should be implemented?" ...and... Does it do "something" while the Create constructor doesn't? If you had two different create constructors (for whatever reason), might you not also need two different destroy destructors? What problems might you get into if you did? C) Just out of curiosity, am wondering why FreeAndNil is global procedure instead of a method/destructor of TObject. I am guessing it is for compatibility with Delphi which may or may not have a reason? I had other curiosity questions but found a nice web page which covers the Delphi Object Model. http://oreilly.com/catalog/delphi/chapter/ch02.html I have gotten several basic programs to run without worrying about these questions, but wanted to make sure I am not going to get into trouble later with some subtle problem cropping up. thanks for any information on this. - ROW ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Corrections and Suggestions for the Docs
On 3 Apr 2009, at 03:32, Michael Van Canneyt wrote: I have received mails with corrections from Peter W A Wood, but didn't answer them yet. I have a deadline for 3 articles today, but tomorrow I'll look at them. My apologies for not responding earlier. No need to apologise. I should apologise for my impatience. I was worried that my message was trapped in a spam filter. Sorry. Regards Peter ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Memory Size
Hi, I need the available memory (heap). At that time the functions maxavail or memavail did this. I read that I should use GetFPCHeapStatus and other function currently. This functions produce allways zero!! What can I do? What is wrong? I use fpc version 2.2.0 [2008/05/27] for i386. Here is some source and output to describe the problem: program memory; var a:TFPCHeapStatus; b:THeapStatus; begin a:=GetFPCHeapStatus; writeln(a.MaxHeapSize); writeln(a.MaxHeapUsed); writeln(a.CurrHeapSize); writeln(a.CurrHeapUsed); writeln(a.CurrHeapFree); writeln('-'); b:=GetHeapStatus; writeln(b.TotalAddrSpace); writeln(b.TotalUncommitted); writeln(b.TotalCommitted); writeln(b.TotalAllocated); writeln(b.TotalFree); writeln(b.FreeSmall); writeln(b.FreeBig); writeln(b.Unused); writeln(b.Overhead); writeln(b.HeapErrorCode); writeln('#-'); a:=SysGetFPCHeapStatus; writeln(a.MaxHeapSize); writeln(a.MaxHeapUsed); writeln(a.CurrHeapSize); writeln(a.CurrHeapUsed); writeln(a.CurrHeapFree); writeln('-'); b:=SysGetHeapStatus; writeln(b.TotalAddrSpace); writeln(b.TotalUncommitted); writeln(b.TotalCommitted); writeln(b.TotalAllocated); writeln(b.TotalFree); writeln(b.FreeSmall); writeln(b.FreeBig); writeln(b.Unused); writeln(b.Overhead); writeln(b.HeapErrorCode); end. This source generate the following output: 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 #- 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Generating code form xmi files
Do you know if some code allready exist to generate Pascal code form xmi files ? What do you mean by generating Pascal code from xml files? Pascal code describes an algorithm, while xml files usually describe data. xmi files (not xml) are used to save uml models : http://en.wikipedia.org/wiki/XML_Metadata_Interchange and I want to gererate my data structures from my uml diagrams I would be suprised if nothing already exists Philippe ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Generating code form xmi files
On 2 Apr 09, at 20:27, Jonas Maebe wrote: > On 02 Apr 2009, at 15:56, philippe.martin...@teleauto.org wrote: > > > Do you know if some code allready exist to generate Pascal code form > > xmi > > files ? > > What do you mean by generating Pascal code from xml files? Pascal code > describes an algorithm, while xml files usually describe data. Well, XMI files, i.e. files used for exporting/storing various UML diagrams, are often supported by code generators. As an example, you could certainly generate Object Pascal classes from a UML class diagram. However, most generators only support Java and C++, that's probably the reason of this question. I cannot answer the question myself though. Tomas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Corrections and Suggestions for the Docs
On Thu, 2 Apr 2009, Jonas Maebe wrote: > > On 02 Apr 2009, at 20:06, Peter W A Wood wrote: > > >I have noticed a few minor editing errors in the docs. What is the process > >for suggesting corrections and improvements? > > Either via direct mail to Michael (mich...@freepascal.org), or by filing a bug > report at http://bugs.freepascal.org I have received mails with corrections from Peter W A Wood, but didn't answer them yet. I have a deadline for 3 articles today, but tomorrow I'll look at them. My apologies for not responding earlier. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Generating code form xmi files
On 02 Apr 2009, at 15:56, philippe.martin...@teleauto.org wrote: Do you know if some code allready exist to generate Pascal code form xmi files ? What do you mean by generating Pascal code from xml files? Pascal code describes an algorithm, while xml files usually describe data. Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Corrections and Suggestions for the Docs
On 02 Apr 2009, at 20:06, Peter W A Wood wrote: I have noticed a few minor editing errors in the docs. What is the process for suggesting corrections and improvements? Either via direct mail to Michael (mich...@freepascal.org), or by filing a bug report at http://bugs.freepascal.org Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Corrections and Suggestions for the Docs
I have noticed a few minor editing errors in the docs. What is the process for suggesting corrections and improvements? Regards Peter ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] oCRT and ncurses in openSuSE 11.0 (32-Bit)
Hello, I wanted to port an old program from fpc 1.0.4 (SuSE 7.0) -> fpc 2.0.4 (openSuSE 11.0, 32-bit). My program uses ken wright's oCRT, and I have a version which was extended by ken wright personally with some additional functions. It was very surprising that I could compile the main part of my program after some minor changes without any error message, but when I start the program, it crashes immediately with an access violation error in the following line: nMakeWindow(StdScrHdr,1,1,nCols(StdScr),3,31,31,31,true,left,''); Ken Wright told me that he has finally handed over the oCRT code to the maintainers of FreePascal and he pleased me to ask "them", so I ask here. He thinks that something in oCRT is not compatible with new kernels or the ncurses libs any more and that this causes the problems. The oCRT units seem to be in that version I finally got from Ken Wright, as the compiler does not rise errors during compilation. So the headers of all procedures seem to include the extensions which Ken made. (If the source includes remarks like "... some more sugar for rainer ..." it is the right one.) If you could help, please? Answers are welcome in German or English. Ing. Rainer Hantsch ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Generating code form xmi files
Do you know if some code allready exist to generate Pascal code form xmi files ? Best regards Philippe ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] ANN: wxForms for Delphi - wxWidgets designer and wrapper for Delphi/Freepascal
Guru Kathiresan wrote: Hello, Today I have released a new product for Delphi and Freepascal – wxForms for Delphi. This is a Pascal wrapper for wxWidgets and a Form designer for Delphi. And what about design forms in Lazarus? Best regards, Paul Ishenin. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Interface reference counting
> var > d3d: IDirect3D9 = nil; // Direct3D interface no need in this. any interface type variable is always initialized with 'nil' value. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Interface reference counting
On Thu, Apr 2, 2009 at 1:46 PM, Felipe Monteiro de Carvalho wrote: > Hello, > > Just to be sure, when using an interface from COM, can I just ignore > it and the compiler will release it when it's scope ends, or do I need > to manually set the variable to nil? When it goes out of scope it gets freed. But I do vaguely remember something in the lines of you are not guaranteed when it gets freed. But with my testing it gets freed pretty quickly. I use interfaces for logging (entering & exiting procedures) and for reseting the mouse cursor when a method exits. Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Interface reference counting
Hello, Just to be sure, when using an interface from COM, can I just ignore it and the compiler will release it when it's scope ends, or do I need to manually set the variable to nil? var d3d: IDirect3D9 = nil; // Direct3D interface begin // create the Direct3D interface d3d := Direct3DCreate9(D3D_SDK_VERSION); // ... use the interface here d3d := nil; // necessary or not? end; thanks, -- Felipe Monteiro de Carvalho ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
AW: [fpc-pascal] ANN: wxForms for Delphi - wxWidgets designer and wrapper for Delphi/Freepascal
Von: Guru Kathiresan Gesendet: Do 02.04.2009 08:46 An: fpc-pascal@lists.freepascal.org; Betreff: [fpc-pascal] ANN: wxForms for Delphi - wxWidgets designer and wrapper for Delphi/Freepascal > Hello, > > Today I have released a new product for Delphi and Freepascal – wxForms for > Delphi . > This is a Pascal wrapper for wxWidgets and a Form designer for Delphi . > For more Information, Please visit http://www.twinforms.com . congrats! to deliver some "marketing" input: after looking at the website i did not immediatley see something about freepascal support :-( Cite "wxForms for Delphi is an integrated wxWidgets form designer for CodeGear Delphi that helps create cross platform applications for Windows and Mac OSX using single source base." on the front page gives me the impression that i can use Delphi to create mac osx apps ? - the faq's make that a bit clearer. but if i were a possible (fpc) customer i would be more happy if see (quicker) that i can use your product with fpc. helmut ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] ANN: wxForms for Delphi - wxWidgets designer and wrapper for Delphi/Freepascal
2009/4/2 Guru Kathiresan : > > Today I have released a new product for Delphi and Freepascal – wxForms for > Delphi. > Congratulations on your release. It's always nice to see people embrace Free Pascal. One question and something you don't mention on your website (well I couldn't find it). For which version of FPC is wxForms for Mac? I guess it will only work with a "release" version of FPC and not the FPC "fixes" branch, otherwise the PPU files will constantly be broken... Correct? This is something that is much easier under Delphi, because CodeGear doesn't release that many versions that often. FPC, especially the fixes branch things change more frequent. Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal