Re: [fpc-pascal] Specifying a Interface type via $Interfaces

2007-10-12 Thread Dean Zobec
2007/10/11, Graeme Geldenhuys <[EMAIL PROTECTED]>: > On 11/10/2007, Dean Zobec <[EMAIL PROTECTED]> wrote: > > > interface types. Could somebody please explain the difference. And > > > why would I use one over the other? > > Corba interfaces are not refer

Re: [fpc-pascal] Specifying a Interface type via $Interfaces

2007-10-12 Thread Dean Zobec
2007/10/11, Graeme Geldenhuys <[EMAIL PROTECTED]>: > On 11/10/2007, Dean Zobec <[EMAIL PROTECTED]> wrote: > > > interface types. Could somebody please explain the difference. And > > > why would I use one over the other? > > Corba interfaces are not refer

Re: [fpc-pascal] Specifying a Interface type via $Interfaces

2007-10-11 Thread Dean Zobec
2007/10/11, Graeme Geldenhuys <[EMAIL PROTECTED]>: > Hi, > > I want to start learning the use of Interfaces. It's a language > feature I have by-passing for some time now. From what I have read > this seems to be a handy language feature to learn. > > In the FPC documentation in mentions I can have

Re: [fpc-pascal] Specifying a Interface type via $Interfaces

2007-10-11 Thread Dean Zobec
2007/10/11, Cesar Romero <[EMAIL PROTECTED]>: > Graeme, > > Hi, > > > > > Hi > > I want to start learning the use of Interfaces. It's a language > > feature I have by-passing for some time now. From what I have read > > this seems to be a handy language feature to learn. > > > > In the FPC document

Re: [fpc-pascal] fpcunit documentation?

2007-06-13 Thread Dean Zobec
Tom Verhoeff pravi: > I know FreePascal includes the fpcunit unit testing framework > (the compiler knows where to find it), but I can't seem to find any > documentation via the regular www.freepascal.org, or the fpc wiki, > or on the lazarus site? > > Michael's fpcunit.pdf seems hidden. Google t

Re: [fpc-pascal] FPCUnit: TestSuiteName vs TestName

2007-05-21 Thread Dean Zobec
Michael Van Canneyt pravi: > > The good news is that fpcunit is scheduled for documentation after fcl-base > and before fcl-db. The bad news is that there are still 12 units to be > documented in fcl-base. Which is about 1/3 of the total number of units > in fcl-base. > > We'll get there. Slo

Re: [fpc-pascal] FPCUnit: TestSuiteName vs TestName

2007-05-21 Thread Dean Zobec
Graeme Geldenhuys pravi: > Looking into the DUnit code I found the reason for passing in the > name. It's actually a Suite Path used to automatically create > TTestSuites for you so you can better group you tests case in a > hierarchy. You would use it if you don't want the registered test > case

Re: [fpc-pascal] FPCUnit: TestSuiteName vs TestName

2007-05-21 Thread Dean Zobec
Graeme, > Hi, > > When would you use TestSuiteName and when TestName? TestSuiteName is the name of the TestSuite (parent) that contains the Test > > For example, the following I think is wrong. > > constructor TTestSuite.Create(AName: string); > begin > Create(); > FName := AName; > end; > >

Re: [fpc-pascal] Reduce size in binary generated by ppc

2007-03-16 Thread Dean Zobec
Jose Pascual pravi: > Hi everyone, > > How is it possible to reduce the size for binary generated by ppc? > http://wiki.freepascal.org/Size_Matters Ciao, Dean ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mai

Re: [fpc-pascal] sqldb firebird on linux can't find client lib

2007-02-15 Thread Dean Zobec
Michael Van Canneyt pravi: > > On Thu, 15 Feb 2007, Bisma Jayadi wrote: > >>> Run your application under 'strace' and send me the output, please. >>> (Zip, please, because it can be rather big) >> Done. Please check your email. I've made the program to the most simplest >> shape just to produce t

Re: [fpc-pascal] New stylesheet for fpcunit xml reports

2007-02-03 Thread Dean Zobec
Graeme, Ok, I'll bite.. ;-) I spoke to Dean the other day and he mentioned a new update for FPCUnit will be sumbitted shortly. I didn't want to start on the new XSLT stylesheet before I know what format the XML is in. Dean, if you can confirm that the new xml format with nested test suits are

Re: [fpc-pascal] New stylesheet for fpcunit xml reports

2007-02-03 Thread Dean Zobec
rectory, the pdf is produced using pdflatex from the latex output). Note that we moved the essential fpcunit units to fcl/inc, the reports and other utils remain in the fpcunit directory. Ciao, Dean Regards, - Graeme - On 2/3/07, Vincent Snijders <[EMAIL PROTECTED]> wrote: > Hi,

Re: [fpc-pascal] Implementing a true Singleton - Can we decrease the visibility of a method?

2006-12-08 Thread Dean Zobec
>> Try this. >> http://bdn.borland.com/article/22576 NewInstance/FreeInstance is what I would have recommended as well. > Maybe we should include an implementation in FPC by default ? How ? The article works as-is AFAIK. Btw, I think singletons are nonsense too. Why is a global variable evil,

Re: [fpc-pascal] Re: fpUnit - AssertEquals gives Access violation

2006-10-07 Thread Dean Zobec
Graeme Geldenhuys ha scritto: > Here is the backtrace. I removed all other Assert tests, so only the > one that causes the problem is executed. > > What is strange though, is that I created a new test that only creates > the object and then tests the ObjectState. It it works, but all the > other

Re: [fpc-pascal] THashedStringList vs TFPHashTable

2006-09-27 Thread Dean Zobec
Graeme Geldenhuys ha scritto: > Thanks to all that replied. The string that is going to be stored in > the List (with associated object) is a GUID string, so is very random > by nature. Would this have any negative affects in the hash table? > > I will try it out anyway, I can always swap the in

Re: [fpc-pascal] THashedStringList vs TFPHashTable

2006-09-27 Thread Dean Zobec
Graeme Geldenhuys ha scritto: > Hi, > > Is TFPHashTable the same as Delphi's THashedStringList? > > I am looking for a List class that can hold large amounts of objects > with a ID string associated for quick lookups. > > Regards, > - Graeme - Yes, similar to a THashedStringList, but with a sp

Re: [fpc-pascal]Book....

2006-09-13 Thread Dean Zobec
bajrang soni ha scritto: > Hello. I just downloaded you Free Pascal software. I haven't programmed in > PASCAL for about 12 years. I am looking for a book or e-book that will > teach > me how to use the NEW pascal. What is the best reference material that you > can think of, consider me a beginner

Re: [fpc-pascal] presenting fpunit test results

2006-09-08 Thread Dean Zobec
Graeme Geldenhuys ha scritto: > Hi Vincent, > > Is is easy to add the list of executed tests (5 min job), but the > missing feature I believe you are looking for is the timing results. > Currently none of the fpcunit results contain timing values. This is > something I wanted to add long ago. Th

Re: [fpc-pascal] data driven fpc unit tests

2006-08-18 Thread Dean Zobec
Vincent Snijders pravi: > Hi, > > Suppose I have a component TMyDataProcessor with the following declaration: > > type > TMyDataProcessor = class > function process(const s: string) : string; > end; > > Now I want to test it with different strings, but instead of hard coding > them I pu

Re: [fpc-pascal] fpcUnit testing Exceptions

2006-07-15 Thread Dean Zobec
Graeme Geldenhuys wrote: > > I think the problem is the SlideTypeDB which is a property! I will > change it to a standard function returning a string and try > @si.SlideTypeDB again. I guess it won't work, since assertException expects a procedure (TRunMethod = procedure of Object). I would crea

Re: [fpc-pascal] fpcUnit testing Exceptions

2006-07-14 Thread Dean Zobec
Graeme Geldenhuys wrote: > Hi, > > Is it possible to test the code below using the AssertException() > call? I am sure it must be, I am just not sure how to use it. > > This is the work-around I have now, untill I can figure out how to use > AssertException() correctly. > ---

Re: [fpc-pascal] Comparing version numbers

2006-06-03 Thread Dean Zobec
Jilani Khaldi wrote: > >> Learn to code with UnitTests (process is called Test Driven >> Development). > > Never used. How does this work? I found only a unit called > "UnitTests.pp" and nothing else. > Thank you. The first article that started the practice, written by Kent Beck and Erich Gamm

Re: [fpc-pascal] for..in loops?

2005-11-20 Thread Dean Zobec
Marco van de Voort wrote: Lukas Gebauer wrote: Look to next Pascal language enhancements in Delphi-2006... (like operator overloads or class variables...) we already have them in free pascal for a couple of years iirc and I've never used them. That's because they are quite l

Re: [fpc-pascal] for..in loops?

2005-11-20 Thread Dean Zobec
Lukas Gebauer wrote: foreach ... in ... do adds no additional abstraction layer. I consider foreach usefull if it allows to create own iterators which are as fast as walking a linked list with p:=p^.next; Especially since it then allows e.g. to write iterators with data prefetching. Just

Re: [fpc-pascal] Lazarus and FPC integration

2005-10-30 Thread Dean Zobec
Agustin Barto wrote: What bad designs does it impose the programmer?? I have a big interest to know because I like to make a as reusable as possible code. Are you talking about the form designer?? Software that's designed starting from the user interface to the behavioral parts of the pro

Re: [fpc-pascal] FPCUnit article/tutorial online.

2005-10-11 Thread Dean Zobec
Alan Mead ha scritto: Hello, The Editor of Toolbox Magazine has allowed me to put an article about FPCUnit online. [...] I found the article and the discussion on this list very helpful. Thanks for writing it and making it available. These are probably stupid questions, but all the ex

Re: [fpc-pascal] FPCUnit article/tutorial online.

2005-10-10 Thread Dean Zobec
L505 ha scritto: Since I don't exactly know what test frameworks are, even after reading about them for the past few years, I'm going to ask some risky questions. This is not a flame thrower attempt at the test framework advocates, I'm just trying to understand what exactly they do, from a "n

Re: [fpc-pascal] unit testing framework for fpc

2005-06-27 Thread Dean Zobec
Michael Van Canneyt wrote: >>Where can I find it? >> >> > >It's included with FPC by default. Sources are in fcl/fpcunit. >Just include fpcunit in your source. See the examples for a console demo. > >Lazarus has a special package that allows you to create either a GUI or >a console test applic

[fpc-pascal] memory leaks with com interfaces?

2004-11-13 Thread Dean Zobec
5 of moneyleak.pp What am I doing wrong? Thank you in advance for any help, Regards, Dean Zobec ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] how to locate address of method name table (cvs build)

2004-10-24 Thread Dean Zobec
Alle 16:03, domenica 24 ottobre 2004, Peter Vreman ha scritto: > At 17:55 22-10-2004, you wrote: > >Using the recent cvs builds of the compiler I was unable to locate the > >address > >of the method name table. Here is a test that works with version 1.9.4 but > >does not work in 1.9.5 anymore: > >

[fpc-pascal] how to locate address of method name table (cvs build)

2004-10-22 Thread Dean Zobec
Using the recent cvs builds of the compiler I was unable to locate the address of the method name table. Here is a test that works with version 1.9.4 but does not work in 1.9.5 anymore: program prova; uses classes; type {$M+} TTestCaseTest = class(TObject) published procedure TestSe

[fpc-pascal] problems with MethodAddress (objpas) fresh cvs build

2004-10-17 Thread Dean Zobec
I'm using some code in objpas to get the names and the addresses of published methods. Lately, in the cvs build, I encountered some problems. See the results of the MethodAddress function in the latest cvs build for example: it cannot get the address of methods (it worked with previous version

Re: [fpc-pascal] Free Pascal soom will land in Italy!

2004-10-09 Thread Dean Zobec
s from Delphi and translated the Junit core testing framework from Java in a day or too: http://camelos.sourceforge.net/fpcUnit.html , so, no doubt for me that FPC is mature for serious programming. If you need help for your article or you need a review, just ask (

Re: [fpc-pascal]Delphi "9" language features...

2004-08-13 Thread Dean Zobec
Matt Emson wrote: Exactly, which is why I prefer the idea Borland has gone for. The STL is not a good idea. Delphi doesn't have a decent containers library. TObjectList is derived from TList instead as being designed as a wrapper (if Borland had read the Danny Thorpe's book they would not imp

[fpc-pascal]no refcounted interfaces

2004-04-08 Thread Dean Zobec
I've talked with some friends of mine about the use of Interface base classes without reference counting in Delphi like this type TNoRefCount = class(TObject, IUnknown) protected function QueryInterface(const IID:TGUID; out Obj):HResult; stdcall; function _AddRef: Integer; stdcall;

Re: [fpc-pascal]TObjectList.free

2004-02-15 Thread Dean Zobec
Alle 12:25, domenica 15 febbraio 2004, [EMAIL PROTECTED] ha scritto: > > > I fixed this. The problem was that the behaviour of Borland's TList > > changed > > > - it got (a lot!) slower. In older TList implementations TList.Clear > > didn't > I understand their reasons, but it's not so cool if yo

Re: [fpc-pascal]problem linking with c

2003-12-24 Thread Dean Zobec
Michalis and Peter, ok, now it works :-), thank you! > You can view generated object file with nm or objdump commands - e.g. call >nm cwrite.o > and you will see that cwrite.o does not contain 'writestringinc' Thank you for the complete explanation, I didn' know for this tools. You know, I'm co

[fpc-pascal]problem linking with c

2003-12-23 Thread Dean Zobec
Hi, i tried to link a c function but had some problems: a simple example: in file cwrite.c #include void writestringinc(void); void writestringinc(void) { puts("This string is written using c"); fflush( stdout ); } compiled with c using g++ -c cwrite.c now, this is a test pr

Re: [fpc-pascal]class methods in FPC version 1.9.0

2003-11-14 Thread Dean Zobec
> I am trying to port the DUnit test framework to fpc and lazarus, see for > more info > http://lazarus-ccr.sourceforge.net/index.php?wiki=DunitProject. I'll take a look > The testframework unit compiles I was able to compile it too, but I have still a lot of work to make it work I guess ;-) > and

Re: [fpc-pascal]class methods in FPC version 1.9.0

2003-11-14 Thread Dean Zobec
> The typecast is incorrect. It should be > > Result:=(AssignPipe(..)<>-1); Thank you. > I'll fix this later this morning, thanks for reporting. It's a pleasure :-) Thank you for the fix. >Delphi port of JUnit called DUnit, but I doubt it will work, > it meddles too much with the internals of obje

Re: [fpc-pascal]class methods in FPC version 1.9.0

2003-11-14 Thread Dean Zobec
> See also http://www.stack.nl/~marcov/buildfaq.pdf for some pointers about > building the FPC cvs. Thank you for the tutorial, it helped me a lot. It was exciting to see the compiler building process on the screen :-) So now I have a 1.9.1 for i386 Linux! I have encountered a problem when doin

Re: [fpc-pascal]class methods in FPC version 1.9.0

2003-11-13 Thread Dean Zobec
> Hmm, here it returns > > -bash-2.05b$ ./bugtest > TMyObject > -bash-2.05b$ > > with > > Free Pascal Compiler version 1.9.1 > > Compiler Date : 2003/11/11 > Compiler Target: i386 > > on FreeBSD > So it could be it that is already fixed after 1.9.0 Great, :-) One more question, where can I find th