Re: [fpc-pascal] Class procedure assigned to object's event

2009-05-27 Thread Micha Nelissen
Antonio Sanguigni wrote: For the second one: main.pas(261,19) Error: Incompatible types: got "" expected "" Remove the 'class' keyword from your function. A class method is a different beast (with different signature) from a regular method. Micha _

Re: [fpc-pascal] exceptions

2009-05-27 Thread Jonas Maebe
On 27 May 2009, at 19:24, Rainer Stratmann wrote: Am Mittwoch, 27. Mai 2009 11:45 schrieb Vincent Snijders: Rainer Stratmann schreef: Am Dienstag, 26. Mai 2009 22:27 schrieb Jonas Maebe: Well, as I said: it does not raise any exceptions. Would it be possible to catch that exception? With t

Re: [fpc-pascal] IE 200307043

2009-05-27 Thread Jonas Maebe
On 27 May 2009, at 19:26, Prince Riley wrote: p := p + nil; is INVALID (expression is valid, operands valid but result is invalid) -- execution error, execution addressing exception This will always be invalid regardless of how nil is handled, because you cannot add two pointers togethe

Re: [fpc-pascal] IE 200307043

2009-05-27 Thread Prince Riley
Hello Frank, If my past post was unclear as to whether I think the constant 'nil' is an address, then let me be clear. I quoted the Borland Object Pascal's statement nil 'does not reference anything' I was not equating it to a zero address value. While a pointer with a 'zero' address value shoul

Re: [fpc-pascal] exceptions

2009-05-27 Thread Rainer Stratmann
Am Mittwoch, 27. Mai 2009 11:45 schrieb Vincent Snijders: > Rainer Stratmann schreef: > > Am Dienstag, 26. Mai 2009 22:27 schrieb Jonas Maebe: > >> Well, as I said: it does not raise any exceptions. > > > > Would it be possible to catch that exception? > > With the try except block? > > Are other f

Re: [fpc-pascal] IE 200307043

2009-05-27 Thread Frank Peelo
JoshyFun wrote: Hello Frank, Wednesday, May 27, 2009, 2:49:26 PM, you wrote: FP> But I'm more puzzled by what it would /mean/. In spite of your bracketed FP> comment here, you seem to be thinking that nil is an address: i.e. FP> adding/subtracting/multiplying a literal would mean something. I'm

Re: [fpc-pascal] IE 200307043

2009-05-27 Thread Jürgen Hestermann
From my point of view nil is like the infinite in mathematics, so it is not range bounded and operations like nil+1 are impossible, or in the worst case equal to nil again. Once you assigned nil to a pointer the value becomes in range so it can be operated as usual. Yes, doing arithmetics with N

Re[2]: [fpc-pascal] IE 200307043

2009-05-27 Thread JoshyFun
Hello Frank, Wednesday, May 27, 2009, 2:49:26 PM, you wrote: FP> But I'm more puzzled by what it would /mean/. In spite of your bracketed FP> comment here, you seem to be thinking that nil is an address: i.e. FP> adding/subtracting/multiplying a literal would mean something. I'm just FP> pointing

Re: [fpc-pascal] FP Vector graphics library

2009-05-27 Thread Felipe Monteiro de Carvalho
Ok, so here is the file as it is at the moment for review so that we can stablish a stable API (and I would like it really stable after that). Take into consideration that it's work in progress. The place that I see that could be discussed is: function GetPolyline(ANum: Cardinal): PPolyline

[fpc-pascal] How to emulate SetDIBits and GetDIBits in Linux

2009-05-27 Thread fpclist
Hi guys In MS Windows I use the following API functions: 1/ SetDIBits(bmap.Canvas.Handle, bmap.Handle, 0, bmap.Height, data, PBitmapInfo(bitmapInfop)^, DIB_RGB_COLORS); To set the pixels in a bitmap (bmap) using the colour data found in the specified device-independent bitmap (

Re: [fpc-pascal] FP Vector graphics library

2009-05-27 Thread Michael Van Canneyt
On Wed, 27 May 2009, Felipe Monteiro de Carvalho wrote: On Wed, May 27, 2009 at 10:53 AM, Michael Van Canneyt wrote: All correct, and currently we have support in FPC for raster images. My proposal is to add your code to FPC so we also support vector graphics: FCL-image seems like the approp

Re: [fpc-pascal] FP Vector graphics library

2009-05-27 Thread Felipe Monteiro de Carvalho
On Wed, May 27, 2009 at 10:53 AM, Michael Van Canneyt wrote: > All correct, and currently we have support in FPC for raster images. > My proposal is to add your code to FPC so we also support vector > graphics: FCL-image seems like the appropriate place for this. I see, but are you proposing to a

Re: [fpc-pascal] FP Vector graphics library

2009-05-27 Thread Michael Van Canneyt
On Wed, 27 May 2009, Felipe Monteiro de Carvalho wrote: On Wed, May 27, 2009 at 6:07 AM, Michael Van Canneyt wrote: Shouldn't it be part of FPC's canvas/image support ? But FCL canvas/image is for raster images. I don't see how they would correctly describe vector images. PDF can hold tex

Re: [fpc-pascal] FP Vector graphics library

2009-05-27 Thread Felipe Monteiro de Carvalho
On Wed, May 27, 2009 at 6:07 AM, Michael Van Canneyt wrote: > Shouldn't it be part of FPC's canvas/image support ? But FCL canvas/image is for raster images. I don't see how they would correctly describe vector images. PDF can hold text, raster images and vector images. For this library I am ign

Re: [fpc-pascal] IE 200307043

2009-05-27 Thread Frank Peelo
Prince Riley wrote: Frank, I think the crux of the matter here is how to make the distinction between a pointer with 'no value' and one that is initialized or set to the 'lowest possible value in the range'. The quote I mentioned comes directly from Borland's Object Pascal Langage Manual

Re: [fpc-pascal] exceptions

2009-05-27 Thread Vincent Snijders
Rainer Stratmann schreef: Am Dienstag, 26. Mai 2009 22:27 schrieb Jonas Maebe: Well, as I said: it does not raise any exceptions. Would it be possible to catch that exception? With the try except block? Are other functions existing to catch linux exceptions? No, you cannot catch exception t

Re: [fpc-pascal] exceptions

2009-05-27 Thread Rainer Stratmann
Am Dienstag, 26. Mai 2009 22:27 schrieb Jonas Maebe: > Well, as I said: it does not raise any exceptions. Would it be possible to catch that exception? With the try except block? Are other functions existing to catch linux exceptions? > The socket unit calls through to unix routines (either via l

Re: [fpc-pascal] FP Vector graphics library

2009-05-27 Thread Michael Van Canneyt
On Tue, 26 May 2009, Felipe Monteiro de Carvalho wrote: Hello, I and another worker have developed a vector graphics library for Free Pascal and I am thinking about making it modifyed-LGPL and adding to the lazarus-ccr repository, like fpspreadsheet. So I was wondering, anyone interrested in